| From: | Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com> |
|---|---|
| To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Altering a table with a rowtype column |
| Date: | 2012-03-07 17:22:00 |
| Message-ID: | CANPAkgsA3CrSzK_soK_FTO4S9jcwkA2T4EmQ-=tDzSq7rOhsLg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-general |
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.
Mike
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2012-03-07 17:32:09 | Re: Altering a table with a rowtype column |
| Previous Message | Tom Lane | 2012-03-07 15:59:09 | Re: Extension tracking temp table and causing update failure |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2012-03-07 17:32:09 | Re: Altering a table with a rowtype column |
| Previous Message | Tom Lane | 2012-03-07 17:11:01 | Re: ERROR: could not find tuple for trigger 37463634 |