Doc says nothing about wether CREATE OR REPLACE VIEW can change the COLLATION of an existing field

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: pageorge(at)unice(dot)fr
Subject: Doc says nothing about wether CREATE OR REPLACE VIEW can change the COLLATION of an existing field
Date: 2022-02-15 08:29:39
Message-ID: 164491377967.23316.6256247353274439441@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/sql-createview.html
Description:

What the doc says about CREATE OR REPLACE VIEW :
"The new query must generate the same columns that were generated by the
existing view query (that is, the same column names in the same order and
with the *same data types*), but it may add additional columns to the end of
the list.
*The calculations giving rise to the output columns may be completely
different*."

It doesn't say wether the COLLATION is considered being part of the "data
types" or not, i.e. it doesn't say wether it's possible to change the
COLLATION of an existing field or not.
My tests (under Postgres v. 12.4) showed that the COLLATION of an existing
field can not be changed : trying to do so, postgres says nothing and seems
to accept the SQL statement, but nothing is changed in the database (it
silently fails). From the user perspective, I consider such a silent failure
the WORST situation possible : I would prefer either 1) to get an error
message saying that it's not possible to change the COLLATION of an existing
field - OR even better - 2) to actually change the COLLATION of the existing
field, as requested.

For this reason, I'm also filling a bug report, since postgresql's reaction
was not adapted to my request (neither an appropriate error message nor
successful execution of my SQL statement).

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2022-02-15 15:08:19 Re: tutorial problem solution requires that problem is already fixed
Previous Message PG Doc comments form 2022-02-14 19:18:28 tutorial problem solution requires that problem is already fixed