Re: Referencing "less-unique" foreign keys

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org, vincent(at)magproductions(dot)nl
Subject: Re: Referencing "less-unique" foreign keys
Date: 2005-08-09 15:34:03
Message-ID: 42F8CCEB.8050508@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Having just tried it, I can say that the last version that would take
> that without complaint is 7.0. 7.1 and later give variants of
>
> ERROR: UNIQUE constraint matching given keys for referenced table "localization" not found
>
> So I'm not sure what Alban actually did.

Neither am I. This database was created before I was responsible for
this project, a few years ago - by someone who has left already (which
is a good thing, in his case).

There were 2 or 3 triggers on each refering/referencing table, of which
I assume they were generated by postgresql. I do recall that creating
foreign keys stopped working suddenly (maybe due to an update by our
sysadmin), after which we created the triggers by hand... The "we" here
usually not including me.

I would like to show some of those triggers, but due to the clutter
caused by all the foreign keys we created that way up til last year or
so, that's quite an ordeal... There are tables where the tabel
definition scrolls out of view rather rapidly...

I never liked the way this was solved by my predecessor, this seems a
good opportunity to fix it.

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

//Showing your Vision to the World//

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-08-09 15:54:02 Re: Case sensitivity
Previous Message Csaba Nagy 2005-08-09 15:29:10 Re: Query stucked in pg_stat_activity