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

Re: BUG #1083: Insert query reordering interacts badly with

From: "Martin Langhoff (Catalyst IT)" <martin(at)catalyst(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1083: Insert query reordering interacts badly with
Date: 2004-02-24 06:46:44
Message-ID: 403AF354.5030901@catalyst.net.nz (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-sql
Tom Lane wrote:

>"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
>  
>
>>/* this statement will reverse the order of CURRVAL()/NEXTVAL() to match the 
>>column order of the table */ 
>>INSERT INTO testing (col_b, col_a) VALUES (NEXTVAL('seq'), CURRVAL('seq'));
>>    
>>
>
>This is not a bug.  The order of evaluation of select-lists and
>values-lists is not defined anywhere in the SQL standard, nor promised
>anywhere in the Postgres documentation.  
>
Thanks for the clarification. I am curious, however: I can't find a 
means to achieve the same effect in a deterministic manner. Any pointers?

regards,




martin

-- 
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224                              MOB: +64(21)364-017
      Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------


In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-02-24 06:51:55
Subject: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()
Previous:From: Tom LaneDate: 2004-02-24 05:37:47
Subject: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()

pgsql-sql by date

Next:From: Tom LaneDate: 2004-02-24 06:51:55
Subject: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()
Previous:From: Tom LaneDate: 2004-02-24 05:37:47
Subject: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()

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