Comment 2 for bug 1235266

Revision history for this message
David Lefever @ Taktik (dl-taktik) wrote :

Hello, you are right but the unify_cons_text method does not cover all the cases.

For instance:
dropped constraint 'account_move_line_credit_debit1'. Reason: its definition changed from 'check ((credit * debit) = 0::numeric)' to 'CHECK (credit*debit=0)

I think the way of checking the constraints existing in Postgres and comparing them to the constraint written in the code is not a good solution, as nothing guarantees Postgres will not modify them.