Re: [HACKERS] FOREIGN KEYs (Was: Benchmarking PGSQL against Microsoft SQL 7)
Vadim Mikheev <vadim@krs.ru>
From: Vadim Mikheev <vadim@krs.ru>
To: Hannu Krosing <hannu@trust.ee>
Cc: Bruce Momjian <maillist@candle.pha.pa.us>, Todd Graham Lewis <tlewis@mindspring.net>, lockhart@alumni.caltech.edu, pgsql-hackers@hub.org
Date: 1999-01-11T14:03:31Z
Lists: pgsql-hackers
Hannu Krosing wrote: > > Bruce Momjian wrote: > > > > That leaves foreign keys. We really need to address this, because it > > comes up so often. Can we hash through the issues again, and see if > > someone takes on the project. > > If my memory servers me right: > > Vadim _almost_ did implement FOREIGN KEY syntax just before 6.4 (or I did nothing for syntax. > 6.4.1 ?) > using the trigger version in contrib. > > But he stopped the work as he was unhappy with the way the contrib stuff > worked i.e. the keys can't break the rules even _during_ the statement. I stopped just after starting -:) > I wholly agree with this being broken, but it still would not hurt very > because the same is unfortunately true for current primary keys/unique > indexes, try for example Yes, this would be nice, but I have no time/wish to do this - I would like to do "right" implementation someday. And for UNIQUE keys too. > hannu=> update test set k=k+1; > ERROR: Cannot insert a duplicate key into a unique index > > IMHO the right behaviour would be to allow this kind of updates, and I > suspect that Oracle does allow it. Sure. Vadim