Allow CREATE OR REPLACE VIEW to rename the columns - Mailing list pgsql-hackers

From Fujii Masao
Subject Allow CREATE OR REPLACE VIEW to rename the columns
Date
Msg-id CAHGQGwHoQMD3b-MqTLcp1MgdhCpOKU7QNRwjFooT4_d+ti5v6g@mail.gmail.com
Whole thread Raw
Responses Re: Allow CREATE OR REPLACE VIEW to rename the columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

Currently CREATE OR REPLACE VIEW command fails if the column names
are changed. For example,

    =# CREATE VIEW test AS SELECT 0 AS a;
    =# CREATE OR REPLACE VIEW test AS SELECT 0 AS x;
    ERROR:  cannot change name of view column "a" to "x"

I'd like to propose the attached patch that allows CREATE OR REPLACE VIEW
to rename the view columns. Thought?

Regards,

-- 
Fujii Masao

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Problem with synchronous replication
Next
From: Nikita Glukhov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting