pgsql: Disallow USING clause when altering type of generated column - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Disallow USING clause when altering type of generated column
Date
Msg-id E1sjZFu-001wOz-8V@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Disallow USING clause when altering type of generated column

This does not make sense.  It would write the output of the USING
clause into the converted column, which would violate the generation
expression.  This adds a check to error out if this is specified.

There was a test for this, but that test errored out for a different
reason, so it was not effective.

Reported-by: Jian He <jian.universality@gmail.com>
Reviewed-by: Yugo NAGATA <nagata@sraoss.co.jp>
Discussion: https://www.postgresql.org/message-id/flat/c7083982-69f4-4b14-8315-f9ddb20b9834%40eisentraut.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7589d5c5b98dee21541214950d8a303c6979dd78

Modified Files
--------------
src/backend/commands/tablecmds.c        | 13 ++++++++++++-
src/test/regress/expected/generated.out |  3 ++-
2 files changed, 14 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Rename some shared memory initialization routines
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Rename regress test generated to generated_stored