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: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE |
Date: | 2011-04-14 03:01:17 |
Message-ID: | BANLkTi=M8AgPjaKXurdQX8++Op5KnRx0uA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 8, 2011 at 5:12 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> Implemented as attached. The first patch just adds the ALTER TABLE subcommands
> to attach and detach a table from a composite type. A few open questions
> concerning typed tables will probably yield minor changes to these subcommands.
> I implemented them to be agnostic toward the outcome of those decisions.
I suppose one issue is whether anyone would care to bikeshed on the
proposed syntax. Any takers?
I think you only need an AccessShareLock on InheritsRelationId, since
you are only selecting from it.
If we adopt the elsewhere-proposed approach of forbidding the use of
rowtypes to create typed tables, the circularity-checking logic here
can become simpler. I think it's not actually water-tight right now:
rhaas=# create table a (x int);
CREATE TABLE
rhaas=# create table b of a;
CREATE TABLE
rhaas=# create table c () inherits (b);
CREATE TABLE
rhaas=# create table d of c;
CREATE TABLE
rhaas=# alter table a of d;
ALTER TABLE
pg_dump is not happy with this situation.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2011-04-14 03:36:09 | Re: Itanium HP-UX build failure, register stack |
Previous Message | Robert Haas | 2011-04-14 02:57:29 | Re: Typed table DDL loose ends |