automatic detection of nomore references rows
automatic detection of nomore references rows
От:
Nabil Sayegh <postgresql@e-trolley.de>
Дата:
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