From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'marcelo *EXTERN*'" <marcelo(dot)nicolet(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Schemas and foreign keys |
Date: | 2017-07-21 14:16:56 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B53A85CCE@ntex2010i.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | marcelo | 2017-07-21 14:20:24 | Re: Schemas and foreign keys |
Previous Message | Tom Lane | 2017-07-21 14:09:38 | Re: pg_dump and insert json with copy |