Re: Disallow USING clause when altering type of generated column
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo Nagata <nagata@sraoss.co.jp>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, jian he
<jian.universality@gmail.com>
Date: 2024-08-21T07:14:02Z
Lists: pgsql-hackers
On Wed, 21 Aug 2024 08:17:45 +0200 Peter Eisentraut <peter@eisentraut.org> wrote: > 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. I’m afraid you forgot to attach the patch. It seems for me that this fix is reasonable though. Regards, Yugo Nagata > > 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 > > -- Yugo Nagata <nagata@sraoss.co.jp>
Commits
-
Disallow USING clause when altering type of generated column
- 4d68a043245a 18.0 landed
- 1c57ae795b3c 12.21 landed
- 7589d5c5b98d 13.17 landed
- ecd19a3cc187 14.14 landed
- cf49a606c416 15.9 landed
- 5867ee0056a2 16.5 landed
- fdbf7e46a46d 17.0 landed