Re: Foreign key constraint accepted even when not same - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Foreign key constraint accepted even when not same
Date
Msg-id 20030923073015.L28541@megazone.bigpanda.com
Whole thread Raw
In response to Re: Foreign key constraint accepted even when not same  (Dennis Bjorklund <db@zigo.dhs.org>)
List pgsql-general
On Tue, 23 Sep 2003, Dennis Bjorklund wrote:

> On Mon, 22 Sep 2003, Stephan Szabo wrote:
>
> > it says that the two types must be comparable.  We basically implement the
> > latter, basically using the existance of a usable equality operator as the
> > determination of comparable.
>
> Is it possible to drop the equality operator when one have FK that needs
> it?

Actually, right now, I think it is (as are necessary casts).  That's
probably not good, but since the actual constraint isn't that you can't
drop the equality operator, but that the types must still be comparable
after doing so, I'm not sure how one would represent that right now (for
example, given an int->foo equality operator and foreign key, if there was
say a numeric->foo equality operator, dropping the int one is probably
okay assuming an implicit int->numeric cast).


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: PostgreSQL query failed: ERROR: pg_atoi: zero-length
Next
From: "scott.marlowe"
Date:
Subject: Re: Scalability (both vertical and horizontal)?