pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow USING clause when altering type of generated column
Date: Thu, 29 Aug 2024 07:07:42 +0000
Message-ID: <E1sjZFu-001wOq-6D@gemulon.postgresql.org> (raw)

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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fdbf7e46a46d2ce8a215b37870b14ee2d7cf0fda

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



view thread (7+ messages)  latest in thread

Message-ID: <E1sjZFu-001wOq-6D@gemulon.postgresql.org>
Permalink:  ../E1sjZFu-001wOq-6D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sjZFu-001wOq-6D@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Disallow USING clause when altering type of generated column
  In-Reply-To: <E1sjZFu-001wOq-6D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox