Re: BUG #17477: A crash bug in transformValuesClause()

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: "Jonathan S. Katz" <jkatz@postgresql.org>, krking@zju.edu.cn, pgsql-bugs@lists.postgresql.org
Date: 2022-05-09T18:33:38Z
Lists: pgsql-bugs
Masahiko Sawada <sawada.mshk@gmail.com> writes:
> On Tue, May 10, 2022 at 2:20 AM Jonathan S. Katz <jkatz@postgresql.org> wrote:
>> Confirmed reproducing the crash and that this fixes it. I did a short
>> double-take on the error message:
>> 
>> ERROR:  subquery must return only one column
>> 
>> but it is accurate, given this is what the subquery must do, and zero !=
>> one.

> Agreed. I've also confirmed that the patch fixes this issue and passed
> the regression tests.

Thanks for checking!  I've pushed the fix now.

When we have a little more time, we might want to look into making
VALUES-with-no-columns be fully supported, that is not a syntax error.
That's not a crasher bug though, so I feel no desire to deal with
it under a release deadline.

			regards, tom lane



Commits

  1. Fix core dump in transformValuesClause when there are no columns.