diff options
author | Tom Lane | 2025-03-03 18:09:20 +0000 |
---|---|---|
committer | Tom Lane | 2025-03-03 18:09:20 +0000 |
commit | 4528768d98f83070d625207dcb526982fb18f1ce (patch) | |
tree | de834314024ffdfbe0101f03416ebb6177f723d8 /src/backend/catalog/heap.c | |
parent | 95f650674d2ceea1ba6440a9b0ae89ed3867fd7e (diff) |
Remove now-dead code in StoreAttrDefault().
StoreAttrDefault() is no longer responsible for filling
attmissingval, so remove the code for that.
Get rid of RawColumnDefault.missingMode, too, as we no longer
need that to pass information around.
While here, clean up some sloppy coding in StoreAttrDefault(),
such as failure to use XXXGetDatum macros. These aren't bugs
but they're not good code either.
Reported-by: jian he <[email protected]>
Author: jian he <[email protected]>
Author: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/CACJufxHFssPvkP1we7WMhPD_1kwgbG52o=kQgL+TnVoX5LOyCQ@mail.gmail.com
Diffstat (limited to 'src/backend/catalog/heap.c')
-rw-r--r-- | src/backend/catalog/heap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index f7f36837d76..bd3554c0bfd 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -2320,7 +2320,7 @@ StoreConstraints(Relation rel, List *cooked_constraints, bool is_internal) { case CONSTR_DEFAULT: con->conoid = StoreAttrDefault(rel, con->attnum, con->expr, - is_internal, false); + is_internal); break; case CONSTR_CHECK: con->conoid = @@ -2447,8 +2447,7 @@ AddRelationNewConstraints(Relation rel, castNode(Const, expr)->constisnull)) continue; - defOid = StoreAttrDefault(rel, colDef->attnum, expr, is_internal, - false); + defOid = StoreAttrDefault(rel, colDef->attnum, expr, is_internal); cooked = (CookedConstraint *) palloc(sizeof(CookedConstraint)); cooked->contype = CONSTR_DEFAULT; |