Review of patch renaming constraints

Поиск
Список
Период
Сортировка
От Joshua Berkus
Тема Review of patch renaming constraints
Дата
Msg-id 1216229788.2620.1326429818474.JavaMail.root@mail-1.01.com
обсуждение исходный текст
Ответы Re: Review of patch renaming constraints  (Peter Eisentraut <peter_e@gmx.net>)
Re: Review of patch renaming constraints  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.
Следующее
От: Hitoshi Harada
Дата:
Сообщение: Re: reprise: pretty print viewdefs