Re: sequence in schema -- broken default
От | Joshua D. Drake |
---|---|
Тема | Re: sequence in schema -- broken default |
Дата | |
Msg-id | 40114CB5.2080603@commandprompt.com обсуждение исходный текст |
Ответ на | sequence in schema -- broken default ("Lee Harr" <missive@hotmail.com>) |
Ответы |
Re: sequence in schema -- broken default
|
Список | pgsql-general |
> CREATE DATABASE d; > \c d > > CREATE SCHEMA one; > SET search_path TO one; > > CREATE SEQUENCE foo_seq; > CREATE TABLE foo( > i integer > DEFAULT nextval('foo_seq') > ); > > > SET search_path TO public; > > INSERT INTO foo VALUES (DEFAULT); > > > > The problem is that the DEFAULT nextval(... needs to qualify > the sequence with the schema, but I am not sure how to > determine the schema in my definition file. I am not sure I exactly understand the above paragraph, but from yourexample you are trying to insert into public.foo which does not exist. The value would be one.foo . insert into one.foo values(); Sincerely, Joshua D. Drake > > Any hints? > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC Postgresql support, programming shared hosting and dedicated hosting. +1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com PostgreSQL Replicator -- production quality replication for PostgreSQL
В списке pgsql-general по дате отправления: