Re: non-standard escapes in string literals

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Andrew Pimlott" <pimlott(at)idiomtech(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "F Harvell" <fharvell(at)fts(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: non-standard escapes in string literals
Date: 2002-06-03 11:20:13
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961DEB@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jason Tishler 2002-06-03 13:18:40 Re: HEADS UP: Win32/OS2/BeOS native ports
Previous Message Bruce Momjian 2002-06-03 03:25:36 Re: non-standard escapes in string literals