| From: | Bruno Wolff III <bruno(at)wolff(dot)to> | 
|---|---|
| To: | Matt Van Mater <nutter_(at)hotmail(dot)com> | 
| Cc: | pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: how to preserve \n in select statement | 
| Date: | 2003-12-19 21:26:07 | 
| Message-ID: | 20031219212607.GB14968@wolff.to | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
On Fri, Dec 19, 2003 at 10:06:28 -0500,
  Matt Van Mater <nutter_(at)hotmail(dot)com> wrote:
> I have a table that has a few text value types, and I enter a bunch of text 
> with '\n' representing a newline.  When I select the records from that 
> table, postgresql 7.3 represents those \n as newlines and actually outputs 
> the a newline rather than as a \n as entered.  I want to be able to get my 
> \n text out of the select statement in the exact same manner it was 
> inserted.
If you really want to store \n so that something else will interpret \n
as a newline, then use '\\n' in the string constant.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pedro | 2003-12-19 23:51:03 | Re: INHERITS and Foreign keys | 
| Previous Message | Matt Van Mater | 2003-12-19 18:29:08 | Re: how to preserve \n in select statement |