From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Foreign key data type mismatches |
Date: | 2003-12-01 14:47:38 |
Message-ID: | 200312011447.hB1Elcg07417@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andreas Pflug wrote:
> 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.
Yes, we already talked about throwing a warning if the primary/foreign
key data types are mismatched.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-01 15:13:11 | Re: [HACKERS] initdb should create a warning message [was Re: [ADMIN] Size on Disk] |
Previous Message | Bruce Momjian | 2003-12-01 14:12:35 | Re: ISO 8601 "Time Intervals" of the "format with time-unit |