Re: non-standard escapes in string literals

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: non-standard escapes in string literals
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961DEB@m0114.s-mxs.net
обсуждение исходный текст
Ответ на non-standard escapes in string literals  (pimlott@idiomtech.com (Andrew Pimlott))
Ответы Re: non-standard escapes in string literals  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: HEADS UP: Win32/OS2/BeOS native ports
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: HEADS UP: Win32/OS2/BeOS native ports