Disallow USING clause when altering type of generated column

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Disallow USING clause when altering type of generated column
Date: 2024-08-21 06:17:45
Message-ID: c7083982-69f4-4b14-8315-f9ddb20b9834@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A USING clause when altering the type of a generated column does not
make sense. It would write the output of the USING clause into the
converted column, which would violate the generation expression.

This patch 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.

discovered by Jian He at [0]

[0]:
https://www.postgresql.org/message-id/CACJufxEGPYtFe79hbsMeOBOivfNnPRsw7Gjvk67m1x2MQggyiQ@mail.gmail.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-08-21 06:24:28 Re: Logical Replication of sequences
Previous Message shveta malik 2024-08-21 06:15:37 Re: Conflict detection and logging in logical replication