Re: Join between databases or (???) - Mailing list pgsql-general

From gnari
Subject Re: Join between databases or (???)
Date
Msg-id 000701c4d01f$caafd0e0$0100000a@wp2000
Whole thread Raw
In response to Re: Join between databases or (???)  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
From: "Net Virtual Mailing Lists" <mailinglists@net-virtual.com>


> See comments below..
>
>
> >> CREATE TABLE testschema.industries (
> >>     industry_id integer DEFAULT nextv
> >> al('"testschema.industries_industry_id_seq"'::text) NOT NULL,
> >> [...]
> >>
> >> When I try to insert a value into schema.industries it complains about
> >> testschema.industries_industry_id_seq not existing, yet I can execute
> >> "nextval" against that very schema....  Any idea what might be going
> >> wrong here?...
> >
>
> pg_dump created it with the double quotes, I have been modifying the dump
> to make it so appropriate things get created inside the schema, so I
> added in the testschema. part of it in this example.

if you put the schema name inside the double quotes, it gets interpreted
as part of the relation name.
try DEFAULT nextval('testschema."industries_industry_id_seq"'::text)
or  DEFAULT nextval('"testschema"."industries_industry_id_seq"'::text)
or  DEFAULT nextval('testschema.industries_industry_id_seq'::text)

gnari



pgsql-general by date:

Previous
From: "Net Virtual Mailing Lists"
Date:
Subject: Re: Join between databases or (???)
Next
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: COMMIT within function?