aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pg_upgrade_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/pg_upgrade_support.c')
-rw-r--r--src/backend/utils/adt/pg_upgrade_support.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/backend/utils/adt/pg_upgrade_support.c b/src/backend/utils/adt/pg_upgrade_support.c
index 0c54b02542f..b8b7777c31b 100644
--- a/src/backend/utils/adt/pg_upgrade_support.c
+++ b/src/backend/utils/adt/pg_upgrade_support.c
@@ -12,6 +12,7 @@
#include "postgres.h"
#include "catalog/binary_upgrade.h"
+#include "catalog/heap.h"
#include "catalog/namespace.h"
#include "catalog/pg_type.h"
#include "commands/extension.h"
@@ -192,3 +193,18 @@ binary_upgrade_set_record_init_privs(PG_FUNCTION_ARGS)
PG_RETURN_VOID();
}
+
+Datum
+binary_upgrade_set_missing_value(PG_FUNCTION_ARGS)
+{
+ Oid table_id = PG_GETARG_OID(0);
+ text *attname = PG_GETARG_TEXT_P(1);
+ text *value = PG_GETARG_TEXT_P(2);
+ char *cattname = text_to_cstring(attname);
+ char *cvalue = text_to_cstring(value);
+
+ CHECK_IS_BINARY_UPGRADE;
+ SetAttrMissing(table_id, cattname, cvalue);
+
+ PG_RETURN_VOID();
+}