mirror of
https://github.com/postgres/postgres.git
synced 2026-01-27 21:43:08 +03:00
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
This commit is contained in:
@@ -29,7 +29,6 @@ typedef struct RawColumnDefault
|
||||
{
|
||||
AttrNumber attnum; /* attribute to attach default to */
|
||||
Node *raw_default; /* default value (untransformed parse tree) */
|
||||
bool missingMode; /* obsolete, no longer used */
|
||||
char generated; /* attgenerated setting */
|
||||
} RawColumnDefault;
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ DECLARE_FOREIGN_KEY((adrelid, adnum), pg_attribute, (attrelid, attnum));
|
||||
|
||||
|
||||
extern Oid StoreAttrDefault(Relation rel, AttrNumber attnum,
|
||||
Node *expr, bool is_internal,
|
||||
bool add_column_mode);
|
||||
Node *expr, bool is_internal);
|
||||
extern void RemoveAttrDefault(Oid relid, AttrNumber attnum,
|
||||
DropBehavior behavior,
|
||||
bool complain, bool internal);
|
||||
|
||||
Reference in New Issue
Block a user