Reject change of output-column collation in CREATE OR REPLACE VIEW.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Feb 2022 17:57:44 +0000 (12:57 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Feb 2022 17:57:44 +0000 (12:57 -0500)
commit2523928b285b06242e0c669fadfc76d73bafdd66
treefb26df74cdc176c0d9f6bfe36e334679c5dbb9c5
parent4d373e05286daff05d7fd0f6e4ab7ff4e5304d81
Reject change of output-column collation in CREATE OR REPLACE VIEW.

checkViewTupleDesc() didn't get the memo that it should verify
same attcollation along with same type/typmod.  (A quick scan
did not find other similar oversights.)

Per bug #17404 from Pierre-AurĂ©lien Georges.  On another day
I might've back-patched this, but today I'm feeling paranoid
about unnecessary behavioral changes in back branches.

Discussion: https://postgr.es/m/17404-8a4a270ef30a6709@postgresql.org
src/backend/commands/view.c
src/test/regress/expected/create_view.out
src/test/regress/sql/create_view.sql