Re: how to inherits the references... - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: how to inherits the references...
Date
Msg-id 20020711085735.H63911-100000@megazone23.bigpanda.com
Whole thread Raw
In response to how to inherits the references...  (frederik nietzsche <nietzsche_psql@yahoo.it>)
Responses Re: how to inherits the references...  (frederik nietzsche <nietzsche_psql@yahoo.it>)
List pgsql-sql
On Thu, 11 Jul 2002, [iso-8859-1] frederik nietzsche wrote:

> as if the sigles where not in the "sigles" table, but
> it's there!
> it's probably because of the way in which psql threats
>  the inheritance.
> my question is (finally): is there some workaround for
> this?? or: am I making some mistakes??

Foreign keys don't inherit to children table on either
the fk or pk side.  Note also that the primary keys in
the above will not guarantee that sigle is unique
across the whole set, only across each table individually.

Pretty much the only workaround I know of is to make a table
with the key columns and have each of the tables in the
inheritance tree have its key columns reference that and anything
that wants to reference the inheritance tree references
the other table instead.



pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: pg_restore cannot restore index
Next
From: Manfred Koizar
Date:
Subject: Re: [HACKERS] please help on query