mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-23 22:37:19 +02:00
which is stored in pg_largeobject_metadata. No backpatch to 9.0 because you can't migrate from 9.0 to 9.0 with the same catversion (because of tablespace conflict), and a pre-9.0 migration to 9.0 has not large object permissions to migrate.
136 lines
2.9 KiB
C
136 lines
2.9 KiB
C
/*
|
|
* pg_upgrade_sysoids.c
|
|
*
|
|
* server-side functions to set backend global variables
|
|
* to control oid and relfilenode assignment
|
|
*
|
|
* Copyright (c) 2010-2011, PostgreSQL Global Development Group
|
|
* contrib/pg_upgrade_support/pg_upgrade_support.c
|
|
*/
|
|
|
|
#include "postgres.h"
|
|
|
|
#include "fmgr.h"
|
|
#include "catalog/dependency.h"
|
|
#include "catalog/pg_class.h"
|
|
|
|
/* THIS IS USED ONLY FOR PG >= 9.0 */
|
|
|
|
#ifdef PG_MODULE_MAGIC
|
|
PG_MODULE_MAGIC;
|
|
#endif
|
|
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_type_oid;
|
|
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
|
|
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
|
|
|
|
Datum set_next_pg_type_oid(PG_FUNCTION_ARGS);
|
|
Datum set_next_array_pg_type_oid(PG_FUNCTION_ARGS);
|
|
Datum set_next_toast_pg_type_oid(PG_FUNCTION_ARGS);
|
|
|
|
Datum set_next_heap_pg_class_oid(PG_FUNCTION_ARGS);
|
|
Datum set_next_index_pg_class_oid(PG_FUNCTION_ARGS);
|
|
Datum set_next_toast_pg_class_oid(PG_FUNCTION_ARGS);
|
|
|
|
Datum set_next_pg_enum_oid(PG_FUNCTION_ARGS);
|
|
Datum set_next_pg_authid_oid(PG_FUNCTION_ARGS);
|
|
|
|
PG_FUNCTION_INFO_V1(set_next_pg_type_oid);
|
|
PG_FUNCTION_INFO_V1(set_next_array_pg_type_oid);
|
|
PG_FUNCTION_INFO_V1(set_next_toast_pg_type_oid);
|
|
|
|
PG_FUNCTION_INFO_V1(set_next_heap_pg_class_oid);
|
|
PG_FUNCTION_INFO_V1(set_next_index_pg_class_oid);
|
|
PG_FUNCTION_INFO_V1(set_next_toast_pg_class_oid);
|
|
|
|
PG_FUNCTION_INFO_V1(set_next_pg_enum_oid);
|
|
PG_FUNCTION_INFO_V1(set_next_pg_authid_oid);
|
|
|
|
|
|
Datum
|
|
set_next_pg_type_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid typoid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_pg_type_oid = typoid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_array_pg_type_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid typoid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_array_pg_type_oid = typoid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_toast_pg_type_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid typoid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_toast_pg_type_oid = typoid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_heap_pg_class_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid reloid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_heap_pg_class_oid = reloid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_index_pg_class_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid reloid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_index_pg_class_oid = reloid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_toast_pg_class_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid reloid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_toast_pg_class_oid = reloid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_pg_enum_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid enumoid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_pg_enum_oid = enumoid;
|
|
|
|
PG_RETURN_VOID();
|
|
}
|
|
|
|
Datum
|
|
set_next_pg_authid_oid(PG_FUNCTION_ARGS)
|
|
{
|
|
Oid authoid = PG_GETARG_OID(0);
|
|
|
|
binary_upgrade_next_pg_authid_oid = authoid;
|
|
PG_RETURN_VOID();
|
|
}
|
|
|