Re: Typed table DDL loose ends

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Typed table DDL loose ends
Date: 2011-04-14 02:57:29
Message-ID: BANLkTikNBzU-htKXCPFzOmgdKqUB-6Wjbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 9, 2011 at 6:57 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> While looking at the typed table/pg_upgrade problem, I ran into a few smaller
> problems in the area.  I'm not envisioning a need for much code shift to fix
> them, but there are a few points of policy.
>
> * Table row types used in typed tables vs. ALTER TABLE
> As previously noted:
>  CREATE TABLE t ();
>  CREATE TABLE is_a OF t;
>  ALTER TABLE t ADD c int;
>  \d is_a
>  -- No columns
>
> At first I thought we should just forbid the use of table row types in CREATE
> TABLE OF.  However, we've been quite systematic about not distinguishing between
> table row types and CREATE TYPE AS types; I've only found a distinction in ALTER
> TABLE/ALTER TYPE, where we direct you to the other command.  It would be nice to
> preserve this heritage.  That doesn't look particularly difficult; it may
> actually yield a net code reduction.

I guess my gut feeling is that it would make more sense to forbid it
outright for 9.1, and we can look at relaxing that restriction later
if we're so inclined.

Much as with the problem Tom fixed in commit
eb51af71f241e8cb199790dee9ad246bb36b3287, I'm concerned that there may
be other cases that we're not thinking of right now, and while we
could find them all and fix them, the amount of functionality gained
is fairly marginal, and I don't really want to hold up the release
while we bug-swat.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-14 03:01:17 Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE
Previous Message Robert Haas 2011-04-14 02:12:56 Re: Prefered Types