Re: Disallow USING clause when altering type of generated column

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Re: Disallow USING clause when altering type of generated column
Date: 2024-08-21 08:57:48
Message-ID: c54a51a3-2b57-46c9-847a-a2331be432cb@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21.08.24 09:14, Yugo Nagata wrote:
> On Wed, 21 Aug 2024 08:17:45 +0200
> Peter Eisentraut <peter(at)eisentraut(dot)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.

Thanks, here is the patch.

Attachment Content-Type Size
0001-Disallow-USING-clause-when-altering-type-of-generate.patch text/plain 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-08-21 08:59:43 Re: Taking into account syncrep position in flush_lsn reported by apply worker
Previous Message Anthonin Bonnefoy 2024-08-21 07:29:04 Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind