Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id NAA05744 for postgres-redist; Wed, 21 Sep 1994 13:57:04 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199409212057.NAA05744@nobozo.CS.Berkeley.EDU> Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.37.53]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with ESMTP id NAA05733 for ; Wed, 21 Sep 1994 13:57:02 -0700 Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.9/8.1B) with SMTP id NAA07485; Wed, 21 Sep 1994 13:56:55 -0700 Message-Id: <199409212056.NAA07485@faerie.CS.Berkeley.EDU> X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol From: aoki@cs.berkeley.edu (Paul M. Aoki) To: Robert.Patrick@cs.cmu.edu Cc: postgres@postgres.Berkeley.EDU Subject: Re: Text string w/ a '\n' character??? Reply-To: aoki@cs.berkeley.edu (Paul M. Aoki) In-reply-to: Your message of Tue, 20 Sep 1994 16:01:33 -0400 (EDT) Date: Wed, 21 Sep 94 13:56:49 -0700 X-Sender: aoki@postgres.Berkeley.EDU Resent-To: postgres-redist@postgres.Berkeley.EDU X-Mts: smtp Resent-Date: Wed, 21 Sep 94 13:57:04 -0700 Resent-XMts: smtp Robert.Patrick@cs.cmu.edu writes: > Is it possible to store a piece of text in Postgres without losing the > formatting (i.e., carriage returns)? i couldn't quite tell if you had already tried this, but: heliotrope:postgres (22)> cat foo.c main() { (void) PQsetdb("mumble"); (void) PQexec("create foo (x=text)"); (void) PQexec("append foo (x=\"new\\nline\")"); (void) PQfinish(); } heliotrope:postgres (23)> cc foo.c /private/devel/postgres/lib/libpq.a heliotrope:postgres (24)> createdb mumble heliotrope:postgres (25)> a.out heliotrope:postgres (26)> monitor -c 'retrieve (foo.all)' mumble --------------- | x | --------------- | new line | --------------- heliotrope:postgres (27)> -- Paul M. Aoki | University of California at Berkeley aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division (#1776) | Berkeley, CA 94720-1776 ============================================================================== To add/remove yourself to/from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU" If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ==============================================================================