aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_upgrade/function.c')
-rw-r--r--contrib/pg_upgrade/function.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/contrib/pg_upgrade/function.c b/contrib/pg_upgrade/function.c
index d7c790c67d5..c01ff046bbd 100644
--- a/contrib/pg_upgrade/function.c
+++ b/contrib/pg_upgrade/function.c
@@ -36,52 +36,58 @@ install_support_functions_in_new_db(const char *db_name)
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_pg_type_oid(OID) "
+ "binary_upgrade.set_next_pg_type_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_array_pg_type_oid(OID) "
+ "binary_upgrade.set_next_array_pg_type_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_toast_pg_type_oid(OID) "
+ "binary_upgrade.set_next_toast_pg_type_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_heap_pg_class_oid(OID) "
+ "binary_upgrade.set_next_heap_pg_class_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_index_pg_class_oid(OID) "
+ "binary_upgrade.set_next_index_pg_class_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_toast_pg_class_oid(OID) "
+ "binary_upgrade.set_next_toast_pg_class_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_pg_enum_oid(OID) "
+ "binary_upgrade.set_next_pg_enum_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
PQclear(executeQueryOrDie(conn,
"CREATE OR REPLACE FUNCTION "
- " binary_upgrade.set_next_pg_authid_oid(OID) "
+ "binary_upgrade.set_next_pg_authid_oid(OID) "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_support' "
"LANGUAGE C STRICT;"));
+ PQclear(executeQueryOrDie(conn,
+ "CREATE OR REPLACE FUNCTION "
+ "binary_upgrade.create_empty_extension(text, text, bool, text, oid[], text[], text[]) "
+ "RETURNS VOID "
+ "AS '$libdir/pg_upgrade_support' "
+ "LANGUAGE C;"));
PQfinish(conn);
}
@@ -139,8 +145,8 @@ get_loadable_libraries(void)
"SELECT DISTINCT probin "
"FROM pg_catalog.pg_proc "
"WHERE prolang = 13 /* C */ AND "
- " probin IS NOT NULL AND "
- " oid >= %u;",
+ "probin IS NOT NULL AND "
+ "oid >= %u;",
FirstNormalObjectId);
totaltups += PQntuples(ress[dbnum]);