Re: Foreign key constraint accepted even when not same

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
Cc: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Foreign key constraint accepted even when not same
Date: 2003-09-23 00:14:50
Message-ID: 20030922170839.A13760@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-23 00:41:21 Re: Foreign key constraint accepted even when not same
Previous Message Ron Johnson 2003-09-23 00:13:36 Re: State of Beta 2