automatic detection of nomore references rows

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема automatic detection of nomore references rows
Дата
Msg-id 1054041350.6563.34.camel@billy
обсуждение исходный текст
Список pgsql-novice
Hi all,

here's my question of the day:

Since 7.3 now has some more intelligent FOREIGN KEYs (i.e. pg_dump still
knows that certain triggers serve as foreign keys)
is it possible to detect unreferenced rows ?

e.g.:

upload
--------------------
id_upload | filename

picture
--------------------
id_upload | orientation

attachement
--------------------
id_upload | name

Of course I could detect unreferenced rows myself with NOT EXISTS etc.
but as I have many tables that reference upload it would be more
convenient to

SELECT id_upload FROM upload WHERE id_upload IS UNREFERENCED

or something like that.

bye
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : www.e-trolley.de


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

Предыдущее
От: Nabil Sayegh
Дата:
Сообщение: Re: Inserting data of two other tables [Now deleting ...]
Следующее
От: hodges@xprt.net
Дата:
Сообщение: Re: Examples of accessing postgresql with scripts?