Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To:
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"
Date: 2019-10-31 21:33:53
Message-ID: CALtqXTcbHB73u+mD0JS8eYbqKA6vOBvtbRuk52N3DKvBWDuRwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 31, 2019 at 6:56 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Fujii Masao <masao(dot)fujii(at)gmail(dot)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 Content-Type Size
001_alter_tag_ibrar_v1.patch application/octet-stream 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-10-31 22:33:12 libpq sslpassword parameter and callback function
Previous Message Tomas Vondra 2019-10-31 21:24:54 Re: Postgres cache