best way to check identical constraint between databases

Поиск
Список
Период
Сортировка
От Marc Cousin
Тема best way to check identical constraint between databases
Дата
Msg-id ce9ad989-d7ab-d922-671f-df699662ee12@gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi all,


I'm trying to extend pg_tap/pg_tapgen in order to be able to check that 
two databases have the exact same constraints (for all available types 
of constraints).


I am wondering if there is a better way to check that two constraints 
are equal than using pg_get_constraintdef, which is full text and may 
change formatting between releases.

Using the pg_constraints columns could have the same problem anyway. For 
check constraints, for instance, consrc could change formatting (even if 
that's unlikely), and anyway parsing consrc would add much complexity to 
pg_tap… typeids could be different so they would have to be resolved in 
both databases.


So the question is, is there a better way of checking that a constraint 
in a database is the same in another one than using pg_get_constraintdef 
? (and printing a warning in the doc that it is only guaranteed to work 
with the same PG release).


Regards

Marc



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently