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

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SQL99 CREATE TABLE ... (LIKE parent_table)
Date: 2003-05-13 09:08:40
Message-ID: 1052816920.1922.6.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane kirjutas E, 12.05.2003 kell 17:59:
> Rod Taylor <rbt(at)rbt(dot)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.

Are you sure that LIKE is not _supposed_ to be inheritable. I mean that
changes done to the LIKE table should carry over to the table defined
using LIKE:

create table template( i int);
create table instance(like template, t text);
alter table template add column j int;

and now instance should have columns i,j,t .

> 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.

Would this not detach the definitions .

----------
Hannu

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-05-13 09:27:09 Re: patch src/bin/psql/help.c
Previous Message Peter Eisentraut 2003-05-13 08:04:03 Re: GUC and postgresql.conf docs