[PATCH] Sort policies and triggers by table name in pg_dump.

Поиск
Список
Период
Сортировка
От Benjie Gillam
Тема [PATCH] Sort policies and triggers by table name in pg_dump.
Дата
Msg-id CAMThMzEEt2mvBbPgCaZ1Ap1N-moGn=Edxmadddjq89WG4NpPtQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PATCH] Sort policies and triggers by table name in pg_dump.  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hello all,

Currently pg_dump sorts most dumpable objects by priority, namespace, name
and then object ID. Since triggers and RLS policies belong to tables, there
may be more than one with the same name within the same namespace, leading to
potential sorting discrepancies between databases that only differ by object
IDs.

The attached draft patch (made against `pg_dump_sort.c` on master) breaks
ties for trigger and policy objects by using the table name, increasing the
sort order stability. I have compiled it and executed it against a number of
local databases and it behaves as desired.

I am new to PostgreSQL contribution and my C-skills are rusty, so please let
me know if I can improve the patch, or if there are areas of PostgreSQL that
I have overlooked.

Kind regards,

Benjie Gillam

Вложения

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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Efficient output for integer types
Следующее
От: David Fetter
Дата:
Сообщение: Re: Efficient output for integer types