Re:
| От | Tom Lane |
|---|---|
| Тема | Re: |
| Дата | |
| Msg-id | 28332.1040610393@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | ... ("Billy G. Allie" <Bill.Allie@mug.org>) |
| Список | pgsql-general |
"Billy G. Allie" <Bill.Allie@mug.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
В списке pgsql-general по дате отправления: