[COMMITTERS] pgsql: More code review for get_qual_for_list().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: More code review for get_qual_for_list().
Дата
Msg-id E1dFPLI-0005Bb-De@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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 85c2b9a15 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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dced55dafead62cfff81a3fedb35acd8e32c9b02

Modified Files
--------------
src/backend/catalog/partition.c | 126 +++++++++++++++++++---------------------
1 file changed, 61 insertions(+), 65 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: [COMMITTERS] pgsql: Fix typo in comment
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Allow NumericOnly to be "+ FCONST".