Re: [HACKERS] Foreign key data type mismatches

2003-12-01 Thread Stephan Szabo
On Mon, 1 Dec 2003, 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

Re: [HACKERS] Foreign key data type mismatches

2003-12-01 Thread Bruce Momjian
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 t

Re: [HACKERS] Foreign key data type mismatches

2003-12-01 Thread Andreas Pflug
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 ca

[HACKERS] Foreign key data type mismatches

2003-12-01 Thread Peter Eisentraut
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