Re: Bug with child tables referencing parent table?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Stefan Schwarzer <stefan(dot)schwarzer(at)tu-clausthal(dot)de>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug with child tables referencing parent table?
Date: 2002-11-01 18:47:09
Message-ID: 20021101104351.O60625-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Thu, 31 Oct 2002, Stefan Schwarzer wrote:

> I think I've found a bug (see below). If you think it's not a bug, I
> would be thankful for a workaround. I tried omitting the foreign key
> constraint. That works but is unsatisfactory.

Foreign key constraints reference only the table named in the constraint,
not any of its children and isn't inherited to children. If the row were
in test_parent specifically, it would have worked. In general I haven't
seen any great workarounds, usually I'd suggest splitting the key columns
to a separate table and have the each table in the tree reference that.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jord Tanner 2002-11-01 19:14:44 Re: hi-problem in creating database in postgresql 7.2.2
Previous Message Neil Conway 2002-11-01 18:27:42 Re: posgresql 7.3beta3 compile error in src/pl/plperl (perl extension)