
Hi,

On 7.2.1 debian-unstable PG hangs when trying to drop a table which
contains a field referencing another field in the same table as a
foreign key. 

Is it legal/orhtodox to use a "references" on another field of the same
table?
 
Strangely after restarting PG the drop succeeds without hanging.

-- 
    OENONE: Vous aimez. On ne peut vaincre sa destinï¿½e.
            Par un charme fatal vous fï¿½tes entraï¿½nï¿½e.
                                          (Phï¿½dre, J-B Racine, acte 4, scï¿½ne 6)

Thu, 2 May 2002 14:38:32 +0200
Louis-David Mitterrand <vindex@apartia.org>
DROP TABLE hangs because of same table foreign key
Louis-David Mitterrand <vindex@apartia.org> writes:
> On 7.2.1 debian-unstable PG hangs when trying to drop a table which
> contains a field referencing another field in the same table as a
> foreign key. 

I'm a little confused.  Could you post a complete example?

			regards, tom lane

Thu, 02 May 2002 10:33:36 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: DROP TABLE hangs because of same table foreign key 
On Thu, 2 May 2002, Louis-David Mitterrand wrote:

>
> Hi,
>
> On 7.2.1 debian-unstable PG hangs when trying to drop a table which
> contains a field referencing another field in the same table as a
> foreign key.
>
> Is it legal/orhtodox to use a "references" on another field of the same
> table?

Should be.
Were there any other transactions open at the time?  Given it went away
after restarting, I'd first guess that something else might have a lock
on the table.


Thu, 2 May 2002 08:32:57 -0700 (PDT)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: DROP TABLE hangs because of same table foreign key