Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Stephan Szabo
On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about supporting alter table drop foreign key? - he said as he went to drop a foreign key It seems to work for me on my 7.3b2 system with alter table table drop constraint constraint name;

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 8:20, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about supporting alter table drop foreign key? - he said as he went to drop a foreign key It seems to work for me on my 7.3b2 system with alter table

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 8:20, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about supporting alter table drop foreign key? - he said as he went to drop a foreign key It seems to work for me on my 7.3b2 system with alter table

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Stephan Szabo
On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 8:20, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about supporting alter table drop foreign key? - he said as he went to drop a foreign key It seems to

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 8:44, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 8:20, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about supporting alter table drop foreign key? - he

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 11:47, Dan Langille wrote: On 5 Dec 2002 at 8:44, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 8:20, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: We support alter table add foreign key. How about

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Stephan Szabo
On Thu, 5 Dec 2002, Dan Langille wrote: Found the solution: drop trigger RI_ConstraintTrigger_4278488 on watch_list_staging; Actually there are three triggers for the constraint. You may have dangling triggers on the other table of the constraint. It's one on the table the constraint's

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 9:02, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: Found the solution: drop trigger RI_ConstraintTrigger_4278488 on watch_list_staging; Actually there are three triggers for the constraint. You may have dangling triggers on the other table of the

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Stephan Szabo
On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 9:02, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: Found the solution: drop trigger RI_ConstraintTrigger_4278488 on watch_list_staging; Actually there are three triggers for the constraint. You may have

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 9:31, Stephan Szabo wrote: When we talk about ALTER TABLE ADD FOREIGN KEY we're being imprecise, so I think that might be why we're talking past each other here. Technically the syntax in question is: ALTER TABLE table ADD table constraint definition where CONSTRAINT name

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Stephan Szabo
On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 9:31, Stephan Szabo wrote: When we talk about ALTER TABLE ADD FOREIGN KEY we're being imprecise, so I think that might be why we're talking past each other here. Technically the syntax in question is: ALTER TABLE table ADD

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 9:51, Stephan Szabo wrote: On Thu, 5 Dec 2002, Dan Langille wrote: On 5 Dec 2002 at 9:31, Stephan Szabo wrote: When we talk about ALTER TABLE ADD FOREIGN KEY we're being imprecise, so I think that might be why we're talking past each other here. Technically the

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Rod Taylor
Thanks. I guess I should rename my thread to 7.4 - TODO : allow constraint names when using the ALTER TABLE table ADD FOREIGN KEY syntax. You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY -- Rod Taylor [EMAIL PROTECTED] PGP Key: http://www.rbt.ca/rbtpub.asc

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Fernando Nasser
Dan Langille wrote: On 5 Dec 2002 at 11:47, Dan Langille wrote: Primary key: watch_list_staging_pkey Check constraints: watch_list_stag_from_watch_list ((from_watch_list = 't'::bool) OR (from_watch_list = 'f'::bool)) watch_list_stagin_from_pkg_info ((from_pkg_info =

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 14:17, Fernando Nasser wrote: Dan Langille wrote: On 5 Dec 2002 at 11:47, Dan Langille wrote: drop trigger RI_ConstraintTrigger_4278488 on watch_list_staging; You should now go to the table this RI constraint was referring to and delete the two triggers in there as

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Christopher Kings-Lynne
Thanks. I guess I should rename my thread to 7.4 - TODO : allow constraint names when using the ALTER TABLE table ADD FOREIGN KEY syntax. You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY That I know. That syntax is radically different from that

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 11:52, Christopher Kings-Lynne wrote: Thanks. I guess I should rename my thread to 7.4 - TODO : allow constraint names when using the ALTER TABLE table ADD FOREIGN KEY syntax. You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Christopher Kings-Lynne
Isn't it identical? The CONSTRAINT const is SQL standard optional clause for all commands that add constraints. Except that one is ADD CONSTRAINT, the other is an ADD FOREIGN KEY. They are similar in nature but different overall. I think you're getting a little confused here, Dan.

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Rod Taylor
On Thu, 2002-12-05 at 14:52, Christopher Kings-Lynne wrote: Thanks. I guess I should rename my thread to 7.4 - TODO : allow constraint names when using the ALTER TABLE table ADD FOREIGN KEY syntax. You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 12:09, Christopher Kings-Lynne wrote: Isn't it identical? The CONSTRAINT const is SQL standard optional clause for all commands that add constraints. Except that one is ADD CONSTRAINT, the other is an ADD FOREIGN KEY. They are similar in nature but different

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Tom Lane
Dan Langille [EMAIL PROTECTED] writes: You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY That I know. That syntax is radically different from that proposed. So you're proposing we replace a SQL-spec-compliant syntax with one that is not? Why?

Re: [HACKERS] 7.4 - TODO : alter table drop foreign key

2002-12-05 Thread Dan Langille
On 5 Dec 2002 at 15:36, Tom Lane wrote: Dan Langille [EMAIL PROTECTED] writes: You can do that now. ALTER TABLE table ADD CONSTRAINT const FOREIGN KEY That I know. That syntax is radically different from that proposed. So you're proposing we replace a SQL-spec-compliant syntax