Re: SQL99 CREATE TABLE ... (LIKE parent_table)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL99 CREATE TABLE ... (LIKE parent_table)
Дата
Msg-id 10113.1052760072@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL99 CREATE TABLE ... (LIKE parent_table)  (Rod Taylor <rbt@rbt.ca>)
Ответы Re: SQL99 CREATE TABLE ... (LIKE parent_table)  (Rod Taylor <rbt@rbt.ca>)
Список pgsql-patches
Rod Taylor <rbt@rbt.ca> writes:
> On Mon, 2003-05-12 at 10:59, Tom Lane wrote:
>> It'd be better to have a localized bit of code that processes LIKE by
>> generating a ColumnDef schema list.

> That can be done without much of an issue.  Much of the code in
> MergeAttributes will be duplicated in this new routine.

Yeah.  It might be worth splitting out the duplicated code into little
subroutines with purposes like "make a ColumnDef given this pg_attribute
entry".

> If you consider LIKE is allowed to inherit an IDENTIFIER, which is a
> sequence based column with the intent that it will be a primary key,
> then allowing inheritance of CONSTRAINTS (via an optional flag INCLUDING
> CONSTRAINTS -- default is per spec) only makes sense.

Hm.  Exactly what will LIKE do with a serial column, and will it be
sensible?  (I'd bet not, unless you put in some special cases...)

            regards, tom lane


В списке pgsql-patches по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: SQL99 CREATE TABLE ... (LIKE parent_table)
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: SQL99 CREATE TABLE ... (LIKE parent_table)