Re: non-standard escapes in string literals - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: non-standard escapes in string literals
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961DEB@m0114.s-mxs.net
Whole thread Raw
In response to non-standard escapes in string literals  (pimlott@idiomtech.com (Andrew Pimlott))
Responses Re: non-standard escapes in string literals
List pgsql-hackers
On Mon, June 03 Bruce wrote:
> > On Wed, May 08, 2002 at 06:47:46PM +0200, Zeugswetter SB SD Andreas wrote:
> > > When we are talking about the places where you need double escaping
> > > (once for parser, once for input function) to make it work, I would also
> > > say that that is very cumbersome (not broken, since it is thus documented) :-)
> > > I would also default to strict ANSI, but not depricate the escaping when set.
> > > All imho of course.

> Yes, these are good points.  Our big problem is that we use backslash
> for two things, one for escaping single quotes and for escaping standard
> C characters, like \n.  While we can use the standard-supported '' to
> insert single quotes, what should we do with \n?  The problem is
> switching to standard ANSI solution reduces our functionality.

The problem imho is, that this (no doubt in many cases valuable)
feature reduces the functionality from the ANSI SQL perspective.
Consider a field that is supposed to store Windows filenames,
nam_file='C:\node1\resend\b.dat' :-)

Thus I think a GUC to turn off all escaping except '' would be valuable.

Andreas


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: HEADS UP: Win32/OS2/BeOS native ports
Next
From: "Marc G. Fournier"
Date:
Subject: Re: HEADS UP: Win32/OS2/BeOS native ports