Re: [PATCHES] Foreign key type checking patch

2004-06-09 Thread Fabien COELHO
Dear Tom, Thanks for your reply. > > Here is a proposed patch against 7.4.1 to check exact match > > of foreign key types wrt the referenced keys, and to show > > a warning if this is not the case. > > I think that this concern may be obsolete in CVS tip, I just get the current CVS and had a qu

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Fabien COELHO
> I can think of several cases where it might be reasonable for the types > to be different. Sure. It's all about a warning, not about an error. -- Fabien Coelho - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your f

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Fabien COELHO
> > I wish I would have a WARNING if a foreign key is not declared exactly as > > the key it references. > > The reason why people want such a warning is that the RI checks tend to > be slow if it's not the case. Accordingly, the warning should only > appear if the check is actually going to be s

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> 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 give

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Stephan Szabo
On Mon, 1 Mar 2004, Fabien COELHO wrote: > > > Here is a proposed patch against 7.4.1 to check exact match > > > of foreign key types wrt the referenced keys, and to show > > > a warning if this is not the case. > > > > I think that this concern may be obsolete in CVS tip, > > I just get the curre

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: > I must admit that I do not understand your point. > I wish I would have a WARNING if a foreign key is not declared exactly as > the key it references. The reason why people want such a warning is that the RI checks tend to be slow if it's not the case.

Re: [PATCHES] Foreign key type checking patch

2004-03-01 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: > Here is a proposed patch against 7.4.1 to check exact match > of foreign key types wrt the referenced keys, and to show > a warning if this is not the case. I think that this concern may be obsolete in CVS tip, at least for the cases where we have indexa

[PATCHES] Foreign key type checking patch

2004-03-01 Thread Fabien COELHO
Hello again patchers, Here is a proposed patch against 7.4.1 to check exact match of foreign key types wrt the referenced keys, and to show a warning if this is not the case. This is an attempt to prevent stupid bugs such as : CREATE TABLE foo(id INT4 NOT NULL PRIMARY KEY); CREATE TABLE bla