Search Postgresql Archives

Re: Altering a table with a rowtype column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 7, 2012 at 11:22 AM, Mike Blackwell <mike.blackwell@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux