Re: Foreign key type checking patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key type checking patch
Date: 2004-03-01 18:23:30
Message-ID: 1295.1078165410@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> I'm really not sure that it makes sense to warn for the fk cases where the
> semantics should be correct (if they're not we need to fix it or make it
> an error) but in which an error might have been made by the user because
> the types are different given that it at least seems reasonable to me that
> the fk type is allowable to be a subset of the referenced type. I don't
> think simply different types is sufficient to be warning material.

I can think of several cases where it might be reasonable for the types
to be different. One case in particular that needs some thought is
where the FK and referenced PK are domains on a common base type.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-03-01 18:36:20 Re: Foreign key type checking patch
Previous Message Stephan Szabo 2004-03-01 18:20:13 Re: Foreign key type checking patch

Browse pgsql-patches by date

  From Date Subject
Next Message Fabien COELHO 2004-03-01 18:36:20 Re: Foreign key type checking patch
Previous Message Stephan Szabo 2004-03-01 18:20:13 Re: Foreign key type checking patch