Remove now-dead code in StoreAttrDefault().
Tom Lane <tgl@sss.pgh.pa.us>
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 <jian.universality@gmail.com> Author: jian he <jian.universality@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CACJufxHFssPvkP1we7WMhPD_1kwgbG52o=kQgL+TnVoX5LOyCQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/heap.c | modified | +2 −3 |
| src/backend/catalog/pg_attrdef.c | modified | +6 −71 |
| src/backend/commands/tablecmds.c | modified | +2 −6 |
| src/include/catalog/heap.h | modified | +0 −1 |
| src/include/catalog/pg_attrdef.h | modified | +1 −2 |
Discussion
- bug when apply fast default mechanism for adding new column over domain with default value 15 messages · 2025-03-01 → 2025-04-02