More code review for get_qual_for_list().
Avoid trashing the input PartitionBoundSpec; while that might be safe for current callers, it's certainly trouble waiting to happen. In the same vein, make sure that all of the result data structure is freshly palloc'd, rather than some of it being pointers into the input data structures (which we don't know the lifespans of). Simplify the logic for tacking on IS NULL or IS NOT NULL conditions some more; commit 85c2b9a1 left a lot on the table there. And rearrange the construction of the nodes into (what seems to me) a more logical order. In passing, make sure that get_qual_for_range() also returns a freshly palloc'd structure, since there's no value in having that guarantee for only one kind of partitioning. And improve some comments there. Jeevan Ladhe, with further tweaking by me Discussion: https://postgr.es/m/CAOgcT0MAcYoMs93W80iTUf_dP36=1mZQzeUk+nnwY_-qWDrCfw@mail.gmail.com
Showing
Please register or sign in to comment