I've fixed up the way domain constraints (not null and type length)
Bruce Momjian <bruce@momjian.us>
I've fixed up the way domain constraints (not null and type length) are managed as per request. Moved from merging with table attributes to applying themselves during coerce_type() and coerce_type_typmod. Regression tests altered to test the cast() scenarios. Rod Taylor
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +1 −52 |
| src/backend/executor/execQual.c | modified | +46 −1 |
| src/backend/optimizer/util/clauses.c | modified | +17 −1 |
| src/backend/parser/gram.y | modified | +10 −18 |
| src/backend/parser/parse_coerce.c | modified | +93 −16 |
| src/backend/parser/parse_expr.c | modified | +6 −3 |
| src/backend/parser/parse_type.c | modified | +12 −14 |
| src/backend/utils/cache/lsyscache.c | modified | +38 −1 |
| src/include/utils/lsyscache.h | modified | +2 −1 |
| src/test/regress/expected/domain.out | modified | +27 −4 |
| src/test/regress/sql/domain.sql | modified | +11 −1 |