Onno Molenkamp wrote:
> Hi,
>
> I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
> following statement stopped working:
>
> insert into test (b) select currval('test_a_seq'::regclass)
It's generally a REALLY bad idea to mix `nextval' and `currval' use on
the same sequenc
Onno Molenkamp writes:
> I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
> following statement stopped working:
> insert into test (b) select currval('test_a_seq'::regclass)
It doesn't work in 8.1 either:
Welcome to psql 8.1.16, the PostgreSQL interactive terminal.
Typ
On 14/02/2009 11:25, Onno Molenkamp wrote:
> I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
> following statement stopped working:
>
> insert into test (b) select currval('test_a_seq'::regclass)
I don't think this was ever guaranteed to work - the docs say pretty
clearl
Hi,
I know that, and nextval -is- being called because it's the default value of
column "a". The problem is that apparently the order in which it's called has
changed for the form with a select, not that I don't know the difference
between currval and nextval.
Onno
Op Saturday 14 February 200
nextval.
currval only has value, when sequence wwas used in the session before,
you would use it to obtain last value returened by nextval. read the
manual .
On Sat, Feb 14, 2009 at 11:25 AM, Onno Molenkamp wrote:
> Hi,
>
> I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
>
Hi,
I recently upgraded a database from 8.1.11 to 8.3.6, and I noticed the
following statement stopped working:
insert into test (b) select currval('test_a_seq'::regclass)
given the following table:
create table test (a serial, b int)
The error I'm getting is: "ERROR: currval of sequence