Re: INFORMATION_SCHEMA and foreign keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INFORMATION_SCHEMA and foreign keys
Дата
Msg-id 3724.1094436837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: INFORMATION_SCHEMA and foreign keys  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-sql
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> On Mon, 6 Sep 2004, Troels Arvin wrote:
>> Is my only way forward to drop using the INFORMATION_SCHEMA and work with
>> the pg_catalog if I want to determine which columns are being referred to
>> in a (set of) foreign key column(s)?

> Possibly, yes.  You'd be better off if you named your constraints rather
> than letting the system name them for you, but in general you can't rely
> on someone else doing that.  This is a side effect of allowing table
> unique constraint names rather than schema unique constraint names (as a
> side note you would need to constrain schema in those joins even if we
> did schema unique names).

FWIW, the default constraint name creation rules have been rejiggered in
8.0 so that it's much more likely that generated names will be unique
schema-wide (see ChooseConstraintName).  But we do not make any attempt
to positively guarantee this --- in particular, the user can still pick
nonunique constraint names, and databases reloaded from existing dumps
are likely to still have lots of "$1" etc.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: INFORMATION_SCHEMA and foreign keys
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Full access to a DB with a second user?