Saturday, September 27, 2008

Re: [GENERAL] sequence... my nightmare :-(

On Sat, Sep 27, 2008 at 10:21 AM, Alain Roger <> 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";
select nextval('Abc');
ERROR: relation "abc" does not exist
select nextval('"Abc"');
(1 row)

Sent via pgsql-general mailing list (
To make changes to your subscription:

No comments: