Re: [GENERAL] Schemas and foreign keys

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: [GENERAL] Schemas and foreign keys
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B53A85CCE@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на [GENERAL] Schemas and foreign keys  (marcelo <marcelo.nicolet@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] pg_dump and insert json with copy
Следующее
От: marcelo
Дата:
Сообщение: Re: [GENERAL] Schemas and foreign keys