pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: frederik nietzsche <nietzsche_psql@yahoo.it>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: how to inherits the references...
Date: Fri, 12 Jul 2002 12:29:58 +0200 (CEST)
Message-ID: <20020712102958.36531.qmail@web12904.mail.yahoo.com> (raw)
In-Reply-To: <20020711085735.H63911-100000@megazone23.bigpanda.com>

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/



view thread (4+ messages)  latest in thread

Message-ID: <20020712102958.36531.qmail@web12904.mail.yahoo.com>
Permalink:  ../20020712102958.36531.qmail@web12904.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020712102958.36531.qmail@web12904.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nietzsche_psql@yahoo.it
  Subject: Re: how to inherits the references...
  In-Reply-To: <20020712102958.36531.qmail@web12904.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox