Thread: Strange SERIAL / Sequence error

Strange SERIAL / Sequence error

From
"Christian Marschalek"
Date:
I create a table with:
CREATE TABLE "tab" ("asdf" SERIAL, "asdf2" char (20) NOT NULL );

Then I try to insert some data:
INSERT INTO "tab" ("asdf", "asdf2") VALUES
(NEXTVAL('""tab_asdf_seq""'::text), 'asdf')

ERROR: Relation '"tab_asdf_seq"' does not exist

(done with phpPgAdmin 2.3)


Re: Strange SERIAL / Sequence error

From
Tom Lane
Date:
"Christian Marschalek" <cm@chello.at> writes:
> (NEXTVAL('""tab_asdf_seq""'::text), 'asdf')

> ERROR: Relation '"tab_asdf_seq"' does not exist

Don't double those double quotes (you don't really need 'em at all,
but in any case not more than one...)

            regards, tom lane