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 9008.1052751578@sss.pgh.pa.us
Whole thread Raw
In response to SQL99 CREATE TABLE ... (LIKE parent_table)  (Rod Taylor <rbt@rbt.ca>)
Responses Re: SQL99 CREATE TABLE ... (LIKE parent_table)  (Rod Taylor <rbt@rbt.ca>)
Re: SQL99 CREATE TABLE ... (LIKE parent_table)  (Hannu Krosing <hannu@tm.ee>)
List pgsql-patches
Rod Taylor <rbt@rbt.ca> writes:
> Quick patch to add the subject.  Restructures all inheritance to consist
> of a few flags to indicate which structures we want to inherit

I think overloading the inheritance mechanism to serve this purpose is a
bad idea.  It complicates and confuses a significant amount of code
that's already pretty confusing (no, I don't believe you found it all).
It'd be better to have a localized bit of code that processes LIKE by
generating a ColumnDef schema list.

> Yes, I wish to add an option to allow check
> constraints to be carried over despite the below note from Sect. 11.3:

> NOTE 234   <column constraint>s, except for NOT NULL, are not included
> in NCi; <column constraint definition>s are effectively transformed to
> <table constraint definition>s and are thereby also excluded.

Why is it a good idea to ignore the express requirement of the spec?
(I'm not saying it's not a good idea --- that note seems a little odd
to me too --- but presumably the spec writers had some reasons for
doing it that way.  I'd like some justification for not doing it their
way.)

            regards, tom lane


pgsql-patches by date:

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