"Martin Langhoff (Catalyst IT)" <[EMAIL PROTECTED]> writes:
> 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?
How about
SELECT nextval('seq'); -- ignore result
INSERT INTO ... VALUES (currval('
"PostgreSQL Bugs List" <[EMAIL PROTECTED]> 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-lis
I am going to try to move this over the sql list, since it doesn't belong
on bugs.
On Tue, Feb 24, 2004 at 23:47:48 +1300,
Martin Langhoff <[EMAIL PROTECTED]> wrote:
> Tom Lane wrote:
>
> >How about
> >
> >SELECT nextval('seq'); -- ignore result
> >
> >INSERT INTO ... VALUES (currval('seq
Tom Lane wrote:
"PostgreSQL Bugs List" <[EMAIL PROTECTED]> 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 evalua
Tom Lane wrote:
How about
SELECT nextval('seq'); -- ignore result
INSERT INTO ... VALUES (currval('seq'), currval('seq'));
Well, it works for my sample case, I have to agree. Maybe I should
mention that I tried to boil down the bugreport to the simplest repro
case I could.
My actual
On Mon, Feb 23, 2004 at 21:26:57 -0400,
PostgreSQL Bugs List <[EMAIL PROTECTED]> wrote:
>
> Details:
>
> === SQL ===
>
> CREATE TEMP TABLE testing (col_a integer, col_b integer);
> CREATE TEMP SEQUENCE seq;
>
> /* this statement will produce the expected result */
> INSERT INTO testing (col_
The following bug has been logged online:
Bug reference: 1083
Logged by: Martin Langhoff
Email address: [EMAIL PROTECTED]
PostgreSQL version: 7.4
Operating system: Linux irkutsk 2.4.25-piv-smp-server #1 SMP Fri Feb 20
16:56:47 NZDT 2004 i686 unknown
Description: