Re: non-standard escapes in string literals

From: F Harvell <fharvell(at)fts(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Andrew Pimlott <pimlott(at)idiomtech(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: non-standard escapes in string literals
Date: 2002-04-25 21:31:36
Message-ID: 200204252131.g3PLVab00559@odin.fts.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 25 Apr 2002 15:07:44 EDT, Tom Lane wrote:
> F Harvell <fharvell(at)fts(dot)net> writes:
> > This also poses the biggest problem in terms of legacy compatibility.
> > Perhaps the answer is to add a runtime config option (and default it
> > to ANSI) and possibly deprecate the C escaping.
>
> While I wouldn't necessarily object to a runtime option, I do object
> to both the other parts of your proposal ;-). Backslash escaping is
> not broken; we aren't going to remove it or deprecate it, and I would
> vote against making it non-default.
>

Sorry, didn't mean to imply that backslash escaping was broken, just
non-compliant. Beyond that, your recommendations are also probably
the best course of action.

I do desire that the "default" operation of the database be as ANSI
standard compliant as possible, however, I certainly understand the
need to be as backwards compliant as possible. The only issue that I
can see with keeping the backslash escaping default is that new,
non-PostgreSQL programmers will not be expecting the escaping and will
be potentially blindsided by it. (A bigger deal since backslashes are
unusual and are not often tested for/with.) Perhaps prominent notice
in the documentation will be adequate/appropriate. Maybe a section on
differences with the ANSI standard should be created. (Is there
currently a compilation of differences anywhere or are they all
dispersed within the documentation?).

Thanks,
F

--
Mr. F Harvell Phone: +1.407.673.2529
FTS International Data Systems, Inc. Cell: +1.407.467.1919
7457 Aloma Ave, Suite 302 Fax: +1.407.673.4472
Winter Park, FL 32792 mailto:fharvell(at)fts(dot)net

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Loftis 2002-04-25 21:33:57 Re: What is wrong with hashed index usage?
Previous Message Bruce Momjian 2002-04-25 21:25:47 Re: Vote totals for SET in aborted transaction