Re: sequence... my nightmare :-( - Mailing list pgsql-general

From Scott Marlowe
Subject Re: sequence... my nightmare :-(
Date
Msg-id dcc563d10809270954v7613320eh29060428283a8d29@mail.gmail.com
Whole thread Raw
In response to Re: sequence... my nightmare :-(  ("Alain Roger" <raf.news@gmail.com>)
List pgsql-general
On Sat, Sep 27, 2008 at 10:21 AM, Alain Roger <raf.news@gmail.com> wrote:
> if i double-quote it, postgre tells me that the column accounts_id_seq does
> not exist.

You almost got it.  You need to doublequote to tell nextval with
capitalization correctly, then single quote that so the query planner
doesn't say "oh look!  An identifier!

create sequence "Abc";
CREATE SEQUENCE
select nextval('Abc');
ERROR:  relation "abc" does not exist
select nextval('"Abc"');
 nextval
---------
       1
(1 row)

pgsql-general by date:

Previous
From: Martin Gainty
Date:
Subject: Re: sequence... my nightmare :-(
Next
From: Tommy Gildseth
Date:
Subject: Re: Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files