Re: Foreign key data type mismatches

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Foreign key data type mismatches
Date: 2003-12-01 12:40:37
Message-ID: 3FCB36C5.4070000@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:

>I was just annoyed to find out that a foreign key doesn't check whether
>the referenced column has a sufficiently similar data type, it only checks
>whether an = operator exists. This masks schema design errors and typos.
>Should this be tightened up, for example using the castability
>characteristics between the two data types?
>
>

Sounds like a good idea. IMHO normally only *equal* data types should be
referenced in a good data model design, but there's probably the need
for some relaxed check option too.

Regards,
Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2003-12-01 13:32:17 Re: Where does catalog store CHAR length ?
Previous Message Peter Eisentraut 2003-12-01 12:04:49 Foreign key data type mismatches