Strange SERIAL / Sequence error

Started by Christian Marschalekalmost 25 years ago2 messagesgeneral
Jump to latest

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)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christian Marschalek (#1)
Re: Strange SERIAL / Sequence error

"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