Re: Typed table DDL loose ends

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

On Wed, Apr 20, 2011 at 10:53 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Mon, Apr 18, 2011 at 10:44:53PM +0300, Peter Eisentraut wrote:
>> On Sat, 2011-04-09 at 21:57 -0400, Noah Misch wrote:
>> > * Inheriting from a typed table blocks further type DDL
>> >   CREATE TYPE t AS (x int);
>> >   CREATE TABLE parent OF t;
>> >   CREATE TABLE child () INHERITS (parent);
>> >   ALTER TYPE t ADD ATTRIBUTE y int CASCADE;
>> >   -- ERROR:  column must be added to child tables too
>> > We ought to just set INH_YES on the downstream command in ATTypedTableRecursion.
>> > If we get to that point, the user did choose ALTER TYPE CASCADE; it seems fair
>> > to assume he'd want inheritance recursion rather than a later error.
>>
>> Agreed.
>
> Patch attached for that.  Apart from a comment, a test case and a doc update, it
> turned out to be a one-liner.

I have committed this.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniele Varrazzo 2011-04-21 03:04:39 Re: Extension Packaging
Previous Message Tom Lane 2011-04-21 02:51:01 Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE