From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Altering a table with a rowtype column |
Date: | 2012-03-07 17:32:09 |
Message-ID: | CAHyXU0xHT4xNPydEgCvzn=+HqmeH4=8WNxGJnyFp_gitYwzTZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general |
On Wed, Mar 7, 2012 at 11:22 AM, Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com> wrote:
> Given a pair of tables:
>
> create table a (
> id serial,
> stuff text,
> more_stuff text
> );
>
> create table a_audit (
> id serial,
> old_record a,
> new_record a
> );
>
> How can one alter the structure of table a? Attempting
>
> ALTER TABLE a ADD COLUMN even_more_stuff text;
>
> results in the message:
>
> ERROR: cannot alter table "a" because column "a_audit.new_record" uses its
> row type
>
> A solution that doesn't lose the existing data is preferable.
works for me -- what version are you on?
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Blackwell | 2012-03-07 17:46:59 | Re: Altering a table with a rowtype column |
Previous Message | Mike Blackwell | 2012-03-07 17:22:00 | Altering a table with a rowtype column |
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Blackwell | 2012-03-07 17:46:59 | Re: Altering a table with a rowtype column |
Previous Message | Mike Blackwell | 2012-03-07 17:22:00 | Altering a table with a rowtype column |