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)


Reply via email to