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

From Bruce Momjian
Subject Re: Foreign key constraint accepted even when not same
Date
Msg-id 200309250208.h8P28md27643@candle.pha.pa.us
Whole thread Raw
In response to Re: Foreign key constraint accepted even when not same  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Foreign key constraint accepted even when not same
List pgsql-general
Tom Lane wrote:
> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > On Mon, 22 Sep 2003, Jean-Christian Imbeault wrote:
> >> Is it right for postgres to accept a foreign key constraint when the
> >> type of the field is not the same as that of the foreign key?
>
> > IIRC in SQL92 it's said that they need to be the same type, but in SQL99
> > 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.
>
> Note however that performance may be poor with a cross-type foreign key
> reference, if the planner is unable to figure out how to use an index
> for the check queries.

Didn't we agree to throw a NOTICE in cases of a mismatch?  (I think
Peter agreed to a NOTICE but not a WARNING)  Is that completed?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: About GPL and proprietary software
Next
From: Bruce Momjian
Date:
Subject: Re: "Expiring" transactions?