Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2002-12-23 02:26:33
Message-ID: 28332.1040610393@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Billy G. Allie" <Bill(dot)Allie(at)mug(dot)org> writes:
> I have a question about the behavior of the array input routine. How should
> the input string, '{abc"def,defghi",jklmnop}' be parsed? I would think it
> should produce '{"abc\"def","defghi\"","jklmnop"}', but it currently (as of
> 7.3) produces '{"abcdef,defghi","jklmnop"}'.

As did 7.2. Previous releases (at least back to 7.0, the oldest I have
handy to test) did this:

regression=# select '{abc"def,defghi",jklmnop}'::text[];
?column?
--------------------------
{"def,defghi","jklmnop"}
(1 row)

which is certainly pretty bogus, but it established the precedent that a
double-quoted string could be a substring of an array element, and more
specifically that double-quote didn't stop being special just because it
wasn't the first character of the element string.

> Which should be the correct behavior?

I can't see any strong argument in favor of your proposed change. I can
tell you that we will get beat up about it if we change anything in this
line --- so you'd better muster a pretty strong argument.

regards, tom lane

In response to

  • at 2002-12-22 21:36:25 from Billy G. Allie

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-12-23 02:36:27 Re: PerformPortalClose warning in 7.3
Previous Message Gerhard Haering 2002-12-23 01:18:46 Re: PerformPortalClose warning in 7.3