pgsql: Make pg_dump's table of object-type priorities more maintainable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make pg_dump's table of object-type priorities more maintainable
Дата
Msg-id E1kz97q-0000fZ-Np@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make pg_dump's table of object-type priorities more maintainable.

Wedging a new object type into this table has historically required
manually renumbering a lot of existing entries.  (Although it appears
that some people got lazy and re-used the priority level of an
existing object type, even if it wasn't particularly related.)
We can let the compiler do the counting by inventing an enum type that
lists the desired priority levels in order.  Now, if you want to add
or remove a priority level, that's a one-liner.

This patch is not purely cosmetic, because I split apart the priorities
of DO_COLLATION and DO_TRANSFORM, as well as those of DO_ACCESS_METHOD
and DO_OPERATOR, which look to me to have been merged out of expediency
rather than because it was a good idea.  Shell types continue to be
sorted interchangeably with full types, and opclasses interchangeably
with opfamilies.

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/pg_dump_sort.c | 137 ++++++++++++++++++++++++++++-------------
1 file changed, 93 insertions(+), 44 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix function prototypes in dependency.h.
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Optimize DropRelFileNodeBuffers() for recovery.