Re: how to preserve \n in select statement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matt Van Mater" <nutter_(at)hotmail(dot)com>
Cc: bruno(at)wolff(dot)to, pgsql-sql(at)postgresql(dot)org
Subject: Re: how to preserve \n in select statement
Date: 2003-12-20 04:45:47
Message-ID: 14347.1071895547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Matt Van Mater" <nutter_(at)hotmail(dot)com> writes:
> I just don't see why pgsql can't return my data exactly as I entered
> it.

Because you are using an input syntax that requires that quotes and
backslashes be escaped. There are other input methods available that
don't require this, but they have disadvantages of their own. In
particular, you have to separate data from SQL command if you want a
no-escape-processing behavior for data.

> I think this behavior stems from a security problem psql had a while
> back where escape characters were being interpreted, and this may be
> another instance of that functionality.

Matt, you have no idea what you are talking about.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Matt Van Mater 2003-12-20 17:58:39 Re: how to preserve \n in select statement
Previous Message Matt Van Mater 2003-12-20 04:23:26 Re: how to preserve \n in select statement