Thread: foreign keys

foreign keys

From
Anjan Borthakur
Date:
hi, postgres doesn't seem to have incorporated foreign key constraints. i am
using postgres 6,4.then how do they maintain referntial integrity
constraints,discussions are welcome.
-anjan



Re: [INTERFACES] foreign keys

From
Rusty Brooks
Date:
On Mon, 27 Sep 1999, Anjan Borthakur wrote:

==>  postgres doesn't seem to have incorporated foreign key constraints. i am
==>using postgres 6,4.then how do they maintain referntial integrity
==>constraints,discussions are welcome.

They don't.  You are going to have to.  This wasn't added to 6.5.1 either
but maybe in the next release?  This is a GOOD REASON to use
transactions... when you delete something, make sure you delete all
references to it, or if there are references you want to preserve, don't
delete the item.  If there is something wrong you can always roll back.

That said, Postgres does support the _keywords_ refers to so I put them in
my data model hoping for the future.  (My saved text data model that is, I
don't think they have any effect at all on the created tables).

    ,!!!!!!!,      !!!   !!!   ,!!!!!!!!, !!!!!!!!!!!!! !!!,   ,!!!   +    !!!   !!!,    ,!!!  ,!!!  ,!!!'   !!!
`!!!!!'   `!!!  ,!!!    *  ===!!!'===========!!!'========!!!,=======================!!!======--+***+--   !!!!,,!!!!'
,!!! ,!!!    !!!!,         ,!!!        `!!!!!       *   ,!!!!!!!!,'    !!!'  !!!'      !!!!,       !!!'         !!!'
   *  !!!    !!!,   ,!!!  ,!!!  ,!!!   ,!!!     ,!!!         ,!!!         + ,!!!    `!!!   !!!,..!!!'  !!!,  ,!!!'
!!!'        !!!'         + !!!      !!!, ,!!!!!!!!!   `!!!!!!!!'     ,!!!         ,!!!          +
                                              : 
 
==================================================================     :
Rusty Brooks * rbrooks@utdallas.edu                                    .
Life is all about getting what you want.
Love is all about giving something up to get what you need.

1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's the
law!