Re: [GENERAL] Schemas and foreign keys - Mailing list pgsql-general

From Albe Laurenz
Subject Re: [GENERAL] Schemas and foreign keys
Date
Msg-id A737B7A37273E048B164557ADEF4A58B53A85CCE@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to [GENERAL] Schemas and foreign keys  (marcelo <marcelo.nicolet@gmail.com>)
List pgsql-general
marcelo wrote:
> Recently I asked regarding schemas, and received very useful answers. I
> conclude that I can put some tables in one schema and left others in the
> public one.
> If my app selects some schema, the backend will found automatically the
> absent tables in "public".
> So far, so good.
> But what about foreign keys? At least, I will have foreign keys from the
> tables in the specified schema to the tables in "public", because I'm
> thinking that the tables in "public" would be references, while the
> tables residing in the specified schema will be the transactional ones.

That shouldn't be a problem; schemas are just namespaces (with the option
to exclude users through permissions).

Try it and report back if you encounter problems.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] pg_dump and insert json with copy
Next
From: marcelo
Date:
Subject: Re: [GENERAL] Schemas and foreign keys