Re: NEXTVAL function Bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dan Wilson" <phpPgAdmin(at)acucore(dot)com>
Cc: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: NEXTVAL function Bug
Date: 2000-12-27 15:52:52
Message-ID: 7538.977932372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dan Wilson" <phpPgAdmin(at)acucore(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Webb Sprague 2000-12-27 16:12:55 NFS mounted DBs and Vacuum
Previous Message Tom Lane 2000-12-27 15:41:08 Re: SSL