Re: NEXTVAL function Bug - Mailing list pgsql-general

From Tom Lane
Subject Re: NEXTVAL function Bug
Date
Msg-id 7538.977932372@sss.pgh.pa.us
Whole thread Raw
In response to NEXTVAL function Bug  ("Dan Wilson" <phpPgAdmin@acucore.com>)
List pgsql-general
"Dan Wilson" <phpPgAdmin@acucore.com> writes:
> test_db=# insert into "mixed_Case" (mix_id, mix_var) values
> (nextval('mixed_Case_mix_id_seq'), 'not working');
> ERROR:  Relation 'mixed_case_mix_id_seq' does not exist


You need to do it like this:
    nextval('"mixed_Case_mix_id_seq"')

IMHO it's only a historical artifact that nextval wants a quoted name
at all.  The syntax should have been something like nextval(seqname) or
seqname.nextval, with no string literal.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: SSL
Next
From: "Tim Barnard"
Date:
Subject: RE: PQsetnonblocking