Fix pg_get_constraintdef for NOT NULL constraints on domains

We added pg_constraint rows for all not-null constraints, first for
tables and later for domains; but while the ones for tables were
reverted, the ones for domains were not.  However, we did accidentally
revert ruleutils.c support for the ones on domains in 6f8bb7c1e961,
which breaks running pg_get_constraintdef() on them.  Put that back.

This is only needed in branch 17, because we've reinstated this code in
branch master with commit 14e87ffa5c54.  Add some new tests in both
branches.

I couldn't find anything else that needs de-reverting.

Reported-by: Erki Eessaar <erki.eess...@taltech.ee>
Reviewed-by: Magnus Hagander <mag...@hagander.net>
Discussion: 
https://postgr.es/m/as8pr01mb75110350415aab8bbabba1ecfe...@as8pr01mb7511.eurprd01.prod.exchangelabs.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/09d09d4297b9acbc2848ec35e8bf030d6c1fae18

Modified Files
--------------
src/test/regress/expected/domain.out | 14 ++++++++++++++
src/test/regress/sql/domain.sql      | 11 +++++++++++
2 files changed, 25 insertions(+)

Reply via email to