Re: ALTER TABLE RENAME column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mario Weilguni" <mario(dot)weilguni(at)icomedias(dot)com>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "Jim Nasby" <decibel(at)decibel(dot)org>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE RENAME column
Date: 2006-11-17 15:37:35
Message-ID: 13875.1163777855@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Mario Weilguni" <mario(dot)weilguni(at)icomedias(dot)com> writes:
> IMO this should do:
> Alter sequence foo_bar_seq rename to foo_baf_seq;
> Alter table foo alter baf set default nextval('foo_baf_seq')

No, it should not, because that risks breaking other references to the
sequence (eg, in user-written functions). If the user is feeling that
he wants consistency, he can rename the sequence himself and take
responsibility for any side-effects on his code.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-11-17 15:48:33 Re: ALTER TABLE RENAME column
Previous Message Mario Weilguni 2006-11-17 15:30:46 Re: ALTER TABLE RENAME column