Re: Possible to run the server with ANSI/ISO string escapeing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Possible to run the server with ANSI/ISO string escapeing
Date: 2005-02-25 16:16:33
Message-ID: 200502251616.j1PGGXW26197@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Does anyone know if it will be possible to run the server with ANSI/ISO
> string escaping instead of C-style escapes? The C style escaping is a
> shoot-down for our adoption of postgres, since its non-standard.
>
>
> Not yet, but we have a TODO item:
>
> * Allow backslash handling in quoted strings to be disabled for
> portability
>
> The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not
> SQL-spec compliant, so allow such handling to be disabled.
>
> Uh, what is ANSI/ISO escaping actually? I assume you mean only supporting
> '' for literal quotes rather than \' too.
>
> Yes Sir. Being able to disable the backslash-escaping is the desired
> operation. In circles of business deciding wether to move to opensource
> databases this is the silently used excuse (by the critics) to dismiss
> pg since its arguably so fundamental and somewhat dangerous (data loss).
> Getting pg to behave 'normally' would silence this excuse. Is there
> anything I can do to help move this up the todo list?

Uh, yea, this is going to require quite a bit of discussion in the
group, and I am concerned how it will affect other apps using
PostgreSQL. (The mode isn't going to be useful if it breaks plug-in
extensions and stuff.)

I think COPY is always going to need to use backslashes. There is no
other good way to handle special characters and stuff, but I don't see
people complaining that has to be portable.

I think most of it is done in parser/scan.l if you want to hack in there
and get a test implementation working and send in a patch. We can work
on the infrastructure to turn it on and off.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Trewern 2005-02-25 16:19:37 to_char bug?
Previous Message Tom Lane 2005-02-25 16:15:15 Re: postgresql 8.0 advantages