move PartitionBoundInfo creation code

Поиск
Список
Период
Сортировка
От Amit Langote
Тема move PartitionBoundInfo creation code
Дата
Msg-id 3f289da8-6d10-75fe-814a-635e8b191d43@lab.ntt.co.jp
обсуждение исходный текст
Ответы Re: move PartitionBoundInfo creation code  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

Currently, the code that creates a PartitionBoundInfo struct from the
PartitionBoundSpec nodes of constituent partitions read from the catalog
is in RelationBuildPartitionDesc that's in partcache.c.  I think that
da6f3e45dd that moved around the partitioning code [1] really missed the
opportunity to move the aforementioned code into partbounds.c.  I think
there is quite a bit of logic contained in that code that can aptly be
said to belong in partbounds.c.  Also, if factored out into a function of
its own with a proper interface, it could be useful to other callers that
may want to build it for, say, fake partitions [2] which are not real
relations.

Attached find a patch that does such refactoring, along with making some
functions in partbounds.c that are not needed outside static.

Thanks,
Amit

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=da6f3e45ddb

[2]
https://www.postgresql.org/message-id/009901d3f34c%2471e1bdc0%2455a53940%24%40lab.ntt.co.jp

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: move PartitionBoundInfo creation code