Fix NULL pointer reference in _outPathTarget()
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-04-18T07:35:53Z
Lists: pgsql-hackers
Attachments
- fix_array_length_for_printing_sortgrouprefs.patch (application/octet-stream) patch
The array sortgrouprefs[] inside PathTarget might be NULL if we have not identified sort/group columns in this tlist. In that case we would have a NULL pointer reference in _outPathTarget() when trying to print sortgrouprefs[] with WRITE_INDEX_ARRAY as we are using the length of PathTarget->exprs as its array length. Attached is a fix that can address this problem. Thanks Richard
Commits
-
Handle NULL fields in WRITE_INDEX_ARRAY
- 9ddf251f9409 15.0 landed