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

From Tom Lane
Subject Re: BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.
Date
Msg-id 3049978.1644941552@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: Japin Li
Date:
Subject: Re: BUG #17404: CREATE OR REPLACE VIEW does not properly change the COLLATION of an existing field.
Next
From: Tom Lane
Date:
Subject: Re: Report a potential memory leak in setup_config()