Обсуждение: Strange SERIAL / Sequence error

Поиск
Список
Период
Сортировка

Strange SERIAL / Sequence error

От
"Christian Marschalek"
Дата:
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

От
Tom Lane
Дата:
"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