Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-09 Thread Greg Stark
On Fri, Oct 7, 2011 at 5:45 PM, Alex Hunsaker bada...@gmail.com wrote: If I find the time maybe Ill submit something along these lines for the next commit fest. So i just picked up the non-inherited constraints patch and quickly ran into the same problem and found this thread. I think it

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-09 Thread Alex Hunsaker
On Sun, Oct 9, 2011 at 09:17, Greg Stark st...@mit.edu wrote: On Fri, Oct 7, 2011 at 5:45 PM, Alex Hunsaker bada...@gmail.com wrote: If I find the time maybe Ill submit something along these lines for the next commit fest. So i just picked up the non-inherited constraints patch and quickly

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-09 Thread Robert Haas
On Sun, Oct 9, 2011 at 1:56 PM, Alex Hunsaker bada...@gmail.com wrote: So i just picked up the non-inherited constraints patch and quickly ran into the same problem and found this thread. I think it makes sense to hold off on this patch until these issues are resolved. Because we really do

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Robert Haas
On Thu, Oct 6, 2011 at 11:38 PM, Alex Hunsaker bada...@gmail.com wrote: Oh, I see the problem, and I now agree that it's the DROP CONSTRAINT code that is buggy. Want me to roll this fix in as part of the alter table only constraint patch? Or keep it split out? We might want to backpatch to at

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Alex Hunsaker
On Fri, Oct 7, 2011 at 07:53, Robert Haas robertmh...@gmail.com wrote:  The only way we could trip up in that case is if there were two identically named constraints.  We'd have to visit the first tuple, update it, then visit the second tuple, recurse (thus incrementing the command counter),

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Robert Haas
On Fri, Oct 7, 2011 at 11:19 AM, Alex Hunsaker bada...@gmail.com wrote: On Fri, Oct 7, 2011 at 07:53, Robert Haas robertmh...@gmail.com wrote:  The only way we could trip up in that case is if there were two identically named constraints.  We'd have to visit the first tuple, update it, then

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-07 Thread Alex Hunsaker
On Fri, Oct 7, 2011 at 09:50, Robert Haas robertmh...@gmail.com wrote: On Fri, Oct 7, 2011 at 11:19 AM, Alex Hunsaker bada...@gmail.com wrote: My only thought is perhaps we should add that missing unique index on (conrelid, conname). If we are not going to support duplicate names in the code,

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-06 Thread Robert Haas
On Wed, Oct 5, 2011 at 10:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 5, 2011 at 5:53 PM, Alex Hunsaker bada...@gmail.com wrote: tldr: Seems to be broken by http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4da99ea4231e3d8bbf28b666748c1028e7b7d665 : commit

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-06 Thread Alex Hunsaker
On Thu, Oct 6, 2011 at 07:24, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 5, 2011 at 10:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 5, 2011 at 5:53 PM, Alex Hunsaker bada...@gmail.com wrote: tldr: Seems to be broken by

[HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-05 Thread Alex Hunsaker
tldr: Seems to be broken by http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4da99ea4231e3d8bbf28b666748c1028e7b7d665 : commit 4da99ea4231e3d8bbf28b666748c1028e7b7d665 Author: Robert Haas rh...@postgresql.org Date: Mon Jun 27 10:27:17 2011 -0400 Avoid having two copies of the

Re: [HACKERS] alter table only ... drop constraint broken in HEAD

2011-10-05 Thread Robert Haas
On Wed, Oct 5, 2011 at 5:53 PM, Alex Hunsaker bada...@gmail.com wrote: tldr: Seems to be broken by http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4da99ea4231e3d8bbf28b666748c1028e7b7d665 : commit 4da99ea4231e3d8bbf28b666748c1028e7b7d665 Author: Robert Haas