From: | Nabil Sayegh <postgresql(at)e-trolley(dot)de> |
---|---|
To: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | automatic detection of nomore references rows |
Date: | 2003-05-27 13:15:50 |
Message-ID: | 1054041350.6563.34.camel@billy |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | hodges | 2003-05-27 14:45:50 | Re: Examples of accessing postgresql with scripts? |
Previous Message | Nabil Sayegh | 2003-05-27 12:01:05 | Re: Inserting data of two other tables [Now deleting ...] |