From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Lee Harr <missive(at)hotmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: sequence in schema -- broken default |
Date: | 2004-01-23 16:32:53 |
Message-ID: | 40114CB5.2080603@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Haney | 2004-01-23 17:09:06 | Re: Recursive optimization of IN subqueries |
Previous Message | scott.marlowe | 2004-01-23 16:19:09 | Re: psql: relocation error: psql: undefined symbol: PQgetssl |