Re: BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pageorge(at)unice(dot)fr
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.
Date: 2022-02-15 16:12:32
Message-ID: 3049978.1644941552@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> create TABLE my_table (my_text TEXT);
> create VIEW my_view AS SELECT my_text COLLATE "C" FROM my_table;
> create OR REPLACE view my_view AS SELECT my_text COLLATE "en_US.utf8" FROM
> my_table;

> The COLLATION of "my_view"."my_text" should have been changed to
> "en_US.utf8".
> - OR -
> I should have got an error message telling me that it is not possible.

Yeah, that's a bug, it should have thrown an error.

(Changing the collation is impractical for the same reasons that
changing the output datatype is impractical.)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-02-15 16:33:26 Re: Report a potential memory leak in setup_config()
Previous Message Japin Li 2022-02-15 16:00:36 Re: BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.