From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Alain Roger" <raf(dot)news(at)gmail(dot)com> |
Cc: | glynastill(at)yahoo(dot)co(dot)uk, pgsql-general(at)postgresql(dot)org |
Subject: | Re: sequence... my nightmare :-( |
Date: | 2008-09-27 16:54:15 |
Message-ID: | dcc563d10809270954v7613320eh29060428283a8d29@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Sep 27, 2008 at 10:21 AM, Alain Roger <raf(dot)news(at)gmail(dot)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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tommy Gildseth | 2008-09-27 18:15:05 | Re: Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files |
Previous Message | Martin Gainty | 2008-09-27 16:44:46 | Re: sequence... my nightmare :-( |