Skip site navigation (1) Skip section navigation (2)

Re: postgres 7.2.1 parse bug

From: Amin Abdulghani <amin(at)quantiva(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amin Abdulghani <amin(at)quantiva(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres 7.2.1 parse bug
Date: 2002-07-30 15:07:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Was the "new behavior" introduced in 7.2 or 7.2.1? For
me it seems effective 7.2.1. 7.2 seems to go with the
old one. So in 7.2:.
  insert into testa values ('{"bob" 

produces x as the third array element and its in 7.2.1
its abxyz.


On Tue, 30 Jul 2002 10:41:35 -0400
  Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>Amin Abdulghani <amin(at)quantiva(dot)com> writes:
>> Apparently there seems to be a parsing bug in 7.2.1 (
>> though it seems to be OK in 7.2)when inserting into 
>> columns. The bug seems to be that if an
>> array element is quoted with "" followed by spaces 
>> the comma (for the next element), the extra space 
>> part of the text for the element.
>I do not believe this is a bug.  The old behavior was 
>quite buggy
>though.  Consider for example
>	insert into testa values('{"bob" 
>7.1 and before would produce "x" as the third array 
>element value,
>losing anything to the right of the second double-quote. 
> 7.2 produces
>"xyz" which seems a more natural interpretation.  What's 
>even stranger
>	insert into testa values('{"bob" 
>7.2 produces "abxyz", where prior versions produced "x".
>You might say "we ignore leading whitespace in an array 
>element, why
>not trailing whitespace too"?  Well, we could do that, 
>but I'm afraid
>of breaking applications.  Historically trailing 
>whitespace has not
>been ignored --- try
>	insert into testa values('{"bob" ,"moo", abc 
> ,"","theend"}');
>which produces "abc  " in all versions.
>The array parser still has a lot of strange behaviors (it 
>work quite right on non-rectangular inputs, for example) 
>but I haven't
>had time to work more on it.
>			regards, tom lane
>---------------------------(end of 
>TIP 2: you can get off all lists at once with the 
>unregister command
>     (send "unregister YourEmailAddressHere" to 

In response to


pgsql-general by date

Next:From: Sanjeev RathoreDate: 2002-07-30 15:09:50
Subject: importing LargeObjectManager
Previous:From: Bruce MomjianDate: 2002-07-30 15:06:54
Subject: Re: log sql?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group