Re: Referential Integrity --> SystemTables

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Referential Integrity --> SystemTables
Дата
Msg-id Pine.BSF.4.21.0109031024430.76325-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Referential Integrity --> SystemTables  ("David M. Richter" <d.Richter@dkfz-heidelberg.de>)
Список pgsql-general
On Mon, 3 Sep 2001, David M. Richter wrote:

> Hello!
>
> I want to update a old postgresdatabase. In the time of databasecreation
> the postgres had no "references" construct. So the integrity is
> maintained by the C-Driver.
> Now I want to build in the integrity. But i have to maintain
> compatibiliy to old databases in the code itself.
> So my question:
> HOW can I determine if the database has referential integrity used or
> not? Are there in the database any "references" in use or not?
> Maybe it is descripted in any systemtable(pg_xyz)?

Do you mean determining if it supports it or if this database has
constraints defined?  In the former case you pretty much need to do it by
version number probably (7.0+ have it).  In the latter case, you need to
parse out the information from pg_trigger (there are three triggers per fk
constraint, most of the interesting information is in the tgargs column)



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

Предыдущее
От: "Joe Conway"
Дата:
Сообщение: Re: query not using index
Следующее
От: Gilles DAROLD
Дата:
Сообщение: PG log analyzer v1.1