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

From frederik nietzsche
Subject Re: how to inherits the references...
Date
Msg-id 20020712102958.36531.qmail@web12904.mail.yahoo.com
Whole thread Raw
In response to Re: how to inherits the references...  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: how to inherits the references...
List pgsql-sql
ok, thanks for the (double: two mails ;) ) help, but
in this way when I insert a record in a child table,
the key must be already present in the "sigles" table,
otherwise it breaks the reference and doesn't insert
anything.
In order to use this solution I must create a set of
function that when I want to insert something in a
child tables it automatically insert BEFORE, the sigle
in the "sigles" table and THEN insert the values in
the child table.
If this is the only way, I'm going to use it, but I'm
not really satisfied by it...


ciao 
danilo

> 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.
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster 

______________________________________________________________________
Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità.
http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/


pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Query kill
Next
From: "Luis Alberto Amigo Navarro"
Date:
Subject: Re: [HACKERS] please help on query