Re: SQL99 CREATE TABLE ... (LIKE parent_table) - Mailing list pgsql-patches

From Tom Lane
Subject Re: SQL99 CREATE TABLE ... (LIKE parent_table)
Date
Msg-id 10113.1052760072@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL99 CREATE TABLE ... (LIKE parent_table)  (Rod Taylor <rbt@rbt.ca>)
Responses Re: SQL99 CREATE TABLE ... (LIKE parent_table)
List 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 by date:

Previous
From: Rod Taylor
Date:
Subject: Re: SQL99 CREATE TABLE ... (LIKE parent_table)
Next
From: Rod Taylor
Date:
Subject: Re: SQL99 CREATE TABLE ... (LIKE parent_table)