pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rikard Pavelic <rikard.pavelic@zg.htnet.hr>
To: Marti Raudsepp <marti@juffo.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6489: Alter table with composite type/table
Date: Tue, 28 Feb 2012 22:49:22 +0100
Message-ID: <4F4D4BE2.4040106@zg.htnet.hr> (raw)
In-Reply-To: <CABRT9RAif=sWTUeqxjDJe6i4vpkmVVcq9Qt02XL+osPtCH=bxA@mail.gmail.com>
References: <E1S1Han-0001M2-WB@wrigleys.postgresql.org>
	<CABRT9RAif=sWTUeqxjDJe6i4vpkmVVcq9Qt02XL+osPtCH=bxA@mail.gmail.com>

On 28.2.2012. 15:01, Marti Raudsepp wrote:
> On Sat, Feb 25, 2012 at 15:23,  <rikard.pavelic@zg.htnet.hr> wrote:
>> This works:
>> alter table t1 add x float not null;
> Peeking at the code, currently any modifications that cause a rewrite
> of the original table are disallowed.
>
> Adding a nullable column without a default is allowed since it can be
> done without a rewrite -- all rows magically get the value NULL.

As shown in example above, I was adding not null column
(but table was empty so query passed)

> I'm not sure whether it's worth complicating code for this. If you
> want to store composite types in tables, I think you're better off
> using CREATE TYPE/ALTER TYPE.

I guess this falls under advanced type usage
(like recursive types - which can be used for lists)
which are not even recognized as important ;(

Regards,
Rikard



view thread (16+ messages)  latest in thread

Message-ID: <4F4D4BE2.4040106@zg.htnet.hr>
Permalink:  ../4F4D4BE2.4040106@zg.htnet.hr/
Also on:    postgresql.org/message-id/4F4D4BE2.4040106@zg.htnet.hr

 · 

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: rikard.pavelic@zg.htnet.hr, marti@juffo.org
  Subject: Re: BUG #6489: Alter table with composite type/table
  In-Reply-To: <4F4D4BE2.4040106@zg.htnet.hr>
  References: <E1S1Han-0001M2-WB@wrigleys.postgresql.org> <CABRT9RAif=sWTUeqxjDJe6i4vpkmVVcq9Qt02XL+osPtCH=bxA@mail.gmail.com> <4F4D4BE2.4040106@zg.htnet.hr>

* 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