pgsql: Tweak pg_partition_tree for undefined relations andunsupported

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Tweak pg_partition_tree for undefined relations andunsupported
Дата
Msg-id E1gWsk1-00076a-PI@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Tweak pg_partition_tree for undefined relations and unsupported relkinds

This fixes a crash which happened when calling the function directly
with a relation OID referring to a non-existing object, and changes the
behavior so as NULL is returned for unsupported relkinds instead of
generating an error.  This puts the new function in line with many other
system functions, and eases actions like full scans of pg_class.

Author: Michael Paquier
Reviewed-by: Amit Langote, Stephen Frost
Discussion: https://postgr.es/m/20181207010406.GO2407@paquier.xyz

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/partitionfuncs.c       | 11 ++++++-----
src/test/regress/expected/partition_info.out | 18 ++++++++++++++++--
src/test/regress/sql/partition_info.sql      |  1 +
3 files changed, 23 insertions(+), 7 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix test_rls_hooks to assign expression collations properly.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Repair bogus handling of multi-assignment Params in upper planl