Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2011-04-14T03:01:17Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix pg_dump to handle collations applied to columns of composite types.

On Fri, Apr 8, 2011 at 5:12 PM, Noah Misch <noah@leadboat.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