Review of patch renaming constraints - Mailing list pgsql-hackers

From Joshua Berkus
Subject Review of patch renaming constraints
Date
Msg-id 1216229788.2620.1326429818474.JavaMail.root@mail-1.01.com
Whole thread Raw
Responses Re: Review of patch renaming constraints  (Peter Eisentraut <peter_e@gmx.net>)
Re: Review of patch renaming constraints  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Compiling on Ubuntu 10.04 LTS AMD64 on a GoGrid virtual machine from 2012-01-12 git checkout.

Patch applied fine.

Docs are present, build, look good and are clear.

Changes to gram.y required Bison 2.5 to compile.  Are we requiring Bison 2.5 now?  There's no configure check for it,
soit took me quite a while to figure out what was wrong.
 

Make check passed.  Patch has tests for rename constraint.

Most normal uses of alter table ... rename constraint ... worked normally.  However, the patch does not deal correctly
withconstraints which are not inherited, such as primary key constraints:
 

create table master ( category text not null, status int not null, value text );

alter table master add constraint master_key primary key ( category, status );

alter table master rename constraint master_key to master_primary_key;

create table partition_1 () inherits ( master );

create table partition_2 () inherits ( master );

alter table master rename constraint master_primary_key to master_key;

postgres=# alter table master rename constraint master_primary_key to master_key;
ERROR:  constraint "master_primary_key" for table "partition_1" does not exist
STATEMENT:  alter table master rename constraint master_primary_key to master_key;
ERROR:  constraint "master_primary_key" for table "partition_1" does not exist


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
San Francisco


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.
Next
From: Hitoshi Harada
Date:
Subject: Re: reprise: pretty print viewdefs