Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN" - Mailing list pgsql-hackers

From Ibrar Ahmed
Subject Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"
Date
Msg-id CALtqXTcbHB73u+mD0JS8eYbqKA6vOBvtbRuk52N3DKvBWDuRwQ@mail.gmail.com
Whole thread Raw
In response to Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers


On Thu, Oct 31, 2019 at 6:56 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Fujii Masao <masao.fujii@gmail.com> writes:
> ... I found that the command tag of
> ALTER MATERIALIZED VIEW RENAME COLUMN is "ALTER TABLE", not "ALTER VIEW".

>     =# ALTER MATERIALIZED VIEW hoge RENAME COLUMN j TO x;
>     ALTER TABLE

> Is this intentional? Or bug?

Seems like an oversight.

                        regards, tom lane



The same issue is with ALTER FOREIGN TABLE

# ALTER FOREIGN TABLE ft RENAME COLUMN a to t;

ALTER TABLE


# ALTER MATERIALIZED VIEW mv RENAME COLUMN a to r;

ALTER TABLE



Attached patch fixes that for ALTER VIEW , ALTER MATERIALIZED VIEW and ALTER FOREIGN TABLE


# ALTER MATERIALIZED VIEW mv RENAME COLUMN a to r;

ALTER MATERIALIZED VIEW


# ALTER FOREIGN TABLE ft RENAME COLUMN a to t;

ALTER FOREIGN TABLE



--
Ibrar Ahmed
Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Postgres cache
Next
From: Andrew Dunstan
Date:
Subject: libpq sslpassword parameter and callback function