Re: CREATE TABLE ... LIKE composite type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE TABLE ... LIKE composite type
Date: 2004-06-18 14:36:04
Message-ID: 20225.1087569364@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk> writes:
> Is there any reason that the following shouldn't work:

> CREATE TABLE my_new_table (LIKE my_composite_type);

Probably not. I can think of reasons why we might not want to let you
INHERIT from a composite type, but LIKE is just a one-time copy-the-
row-descriptor thing, so it doesn't seem like there should be a problem.

Most likely this is happening because LIKE and INHERITS share a lot of
code. Anyone feel like looking into it? (I'm not gonna, have too much
else to do...)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2004-06-18 14:38:29 7.5-dev, pg_dumpall, dollarquoting
Previous Message Chris Browne 2004-06-18 14:24:36 Re: email browser?