pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Rikard Pavelic <rikard.pavelic@zg.htnet.hr>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6489: Alter table with composite type/table
Date: Tue, 28 Aug 2012 12:54:15 -0400
Message-ID: <3220.1346172855@sss.pgh.pa.us> (raw)
In-Reply-To: <20120828024053.GH6786@momjian.us>
References: <E1S1Han-0001M2-WB@wrigleys.postgresql.org>
	<CAHyXU0z=xkwWaOv7eHiY_21PbyCnuHCjRTtBW+aqyzFD40Xckw@mail.gmail.com>
	<4F60E122.3080409@zg.htnet.hr>
	<20120828024053.GH6786@momjian.us>

Bruce Momjian <bruce@momjian.us> writes:
> On Wed, Mar 14, 2012 at 07:19:14PM +0100, Rikard Pavelic wrote:
>> On 13.3.2012. 20:49, Merlin Moncure wrote:
>>> I personally think it's an oversight.  This was just discussed a
>>> couple of days ago here:
>>> http://postgresql.1045698.n5.nabble.com/Altering-a-table-with-a-rowtype-column-td5544844.html

>> TODO: alter table-type columns according to attribute type rules.
>> Enforce only TYPE features and ignore TABLE features when altering composite table-types.

> Should we add this TODO?  I am confused by the text above though.

I think this is making an assumption that we have consensus on what
are "type" properties and what are only "table" properties; that is,
is it a feature or a bug that column defaults don't work for instances
of composite types?

The ALTER code is rejecting the case on the assumption that we think
this is a bug that should get fixed eventually.  I'd only want to relax
the check if we have consensus that that will never happen.

The thread linked to via nabble above covers a lot of the background and
issues here.  It didn't seem to me that there was clear consensus.

In any case, if we do do this, ISTM the TODO is much less about removing
one test in ALTER TABLE and much more about documenting the chosen
behavior.  I think the reason you're confused by the proposed TODO
wording is exactly that it uses the phrases "TYPE features" and "TABLE
features" as if those concepts were defined or documented anywhere.

			regards, tom lane




view thread (16+ messages)  latest in thread

Message-ID: <3220.1346172855@sss.pgh.pa.us>
Permalink:  ../3220.1346172855@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3220.1346172855@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, rikard.pavelic@zg.htnet.hr, mmoncure@gmail.com
  Subject: Re: BUG #6489: Alter table with composite type/table
  In-Reply-To: <3220.1346172855@sss.pgh.pa.us>
  References: <E1S1Han-0001M2-WB@wrigleys.postgresql.org> <CAHyXU0z=xkwWaOv7eHiY_21PbyCnuHCjRTtBW+aqyzFD40Xckw@mail.gmail.com> <4F60E122.3080409@zg.htnet.hr> <20120828024053.GH6786@momjian.us> <3220.1346172855@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox