Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails
От | Tom Lane |
---|---|
Тема | Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails |
Дата | |
Msg-id | 4645.1475153940@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails (mroscio@tin.it) |
Ответы |
Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL)
fails
|
Список | pgsql-bugs |
mroscio@tin.it writes: > When yyy has no primary keys, all constraints are duly created on xxx. > When yyy has a primary key named pk_yyy, a primary key named xxx_pkey is > created, all other constraints are lost. Works for me ... regression=# create table yyy (f1 int constraint pk_yyy primary key, f2 int unique); CREATE TABLE regression=# \d yyy Table "public.yyy" Column | Type | Modifiers --------+---------+----------- f1 | integer | not null f2 | integer | Indexes: "pk_yyy" PRIMARY KEY, btree (f1) "yyy_f2_key" UNIQUE CONSTRAINT, btree (f2) regression=# create table xxx (like yyy including all); CREATE TABLE regression=# \d xxx Table "public.xxx" Column | Type | Modifiers --------+---------+----------- f1 | integer | not null f2 | integer | Indexes: "xxx_pkey" PRIMARY KEY, btree (f1) "xxx_f2_key" UNIQUE CONSTRAINT, btree (f2) regards, tom lane
В списке pgsql-bugs по дате отправления: