RE: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-07 Thread Christopher Kings-Lynne
o:[EMAIL PROTECTED]]On Behalf Of Christopher > Kings-Lynne > Sent: Friday, 4 May 2001 12:33 PM > To: Hackers > Subject: RE: [HACKERS] Duplicate constraint names in 7.0.3 > > > > A reasonable interpretation of DROP CONSTRAINT "foo" is to drop *all* > > constrai

RE: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Christopher Kings-Lynne
> A reasonable interpretation of DROP CONSTRAINT "foo" is to drop *all* > constraints named "foo" on the target table. Then it should probably be a good thing to avoid the automatic generation of duplicate names? I might take a look at that, actually... Chris ---(end o

Re: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Stephan Szabo
On Thu, 3 May 2001, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > If I read the spec correctly, table constraint names are supposed to be > > unique across a schema. > > That's what the spec says, but I doubt we should enforce it. For one > thing, what do you do with inherited

Re: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > If I read the spec correctly, table constraint names are supposed to be > unique across a schema. That's what the spec says, but I doubt we should enforce it. For one thing, what do you do with inherited constraints? Invent a random name for them? No

RE: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Christopher Kings-Lynne
em? Chris -Original Message- From: Stephan Szabo [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 May 2001 10:48 AM To: Christopher Kings-Lynne Cc: Hackers Subject: Re: [HACKERS] Duplicate constraint names in 7.0.3 If I read the spec correctly, table constraint names are supposed to be unique acros

Re: [HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Stephan Szabo
If I read the spec correctly, table constraint names are supposed to be unique across a schema. So technically the constraint name should also not conflict with the name of an fk constraint, or a unique index. In addition, generated constraint names are supposed to follow the same syntax rules

[HACKERS] Duplicate constraint names in 7.0.3

2001-05-03 Thread Christopher Kings-Lynne
Hi, I have noticed that it is possible to create duplicate CHECK (haven't tried other) constraints in 7.0.3 by doing something like this: CREATE TABLE "test" ( "a" int4, CHECK (a < 400), CONSTRAINT "$1" CHECK (a > 5) ); I was just fiddling around with trying to implement the 'DROP CONS