Fix core dump in transformValuesClause when there are no columns.
Tom Lane <tgl@sss.pgh.pa.us>
Fix core dump in transformValuesClause when there are no columns. The parser code that transformed VALUES from row-oriented to column-oriented lists failed if there were zero columns. You can't write that straightforwardly (though probably you should be able to), but the case can be reached by expanding a "tab.*" reference to a zero-column table. Per bug #17477 from Wang Ke. Back-patch to all supported branches. Discussion: https://postgr.es/m/17477-0af3c6ac6b0a6ae0@postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/analyze.c | modified | +6 −12 |
| src/test/regress/expected/select.out | modified | +7 −0 |
| src/test/regress/sql/select.sql | modified | +5 −0 |
Discussion
- BUG #17477: A crash bug in transformValuesClause() 9 messages · 2022-05-09