Re: Support multi-column renaming? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Support multi-column renaming?
Date
Msg-id 202408061445.j6jnp6jpl5cg@alvherre.pgsql
Whole thread Raw
In response to Support multi-column renaming?  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: Support multi-column renaming?
List pgsql-hackers
On 2024-Aug-06, Kirill Reshke wrote:

> I have noticed that ALTER TABLE supports multiple column actions
> (ADD/DROP column etc), but does not support multiple column renaming.

> Looking closely on gram.y, the only reason for this is that RenameStmt
> is defined less flexible than alter_table_cmds (which is a list). All
> other core infrastructure is ready to allow $subj.
> 
> So is it worth a patch?

Hmm, yeah, maybe it'd be better if ALTER TABLE RENAME is not part of
RenameStmt but instead part of AlterTableStmt.  Probably not a super
trivial code change, but it should be doable.  The interactions with
different subcommands types in the same command should be considered
carefully (as well as with ALTER {VIEW,SEQUENCE,etc} RENAME, which I bet
we don't want changed due to the implications).

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Java is clearly an example of money oriented programming"  (A. Stepanov)



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Incremental View Maintenance, take 2
Next
From: Heikki Linnakangas
Date:
Subject: Re: Fix comments in instr_time.h and remove an unneeded cast to int64