Foreign key data type mismatches

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Foreign key data type mismatches
Date: 2003-12-01 12:04:49
Message-ID: Pine.LNX.4.44.0312011301420.23215-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

--
Peter Eisentraut peter_e(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2003-12-01 12:40:37 Re: Foreign key data type mismatches
Previous Message phd9110 2003-12-01 10:31:56 Where does catalog store CHAR length ?