mirror of https://github.com/citusdata/citus.git
PG15: update copied pg_get_object_address() code.
Account for PG commits 5a2832465fd8 and a0ffa885e478.pull/5920/head
parent
bd455f42e3
commit
033f9cfff7
|
@ -1,6 +1,6 @@
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* pg_get_object_address_12_13_14.c
|
* pg_get_object_address_13_14_15.c
|
||||||
*
|
*
|
||||||
* Copied functions from Postgres pg_get_object_address with acl/owner check.
|
* Copied functions from Postgres pg_get_object_address with acl/owner check.
|
||||||
* Since we need to use intermediate data types Relation and Node from
|
* Since we need to use intermediate data types Relation and Node from
|
||||||
|
@ -40,11 +40,6 @@ static void ErrorIfCurrentUserCanNotDistributeObject(ObjectType type,
|
||||||
Relation *relation);
|
Relation *relation);
|
||||||
static List * textarray_to_strvaluelist(ArrayType *arr);
|
static List * textarray_to_strvaluelist(ArrayType *arr);
|
||||||
|
|
||||||
/* It is defined on PG >= 13 versions by default */
|
|
||||||
#if PG_VERSION_NUM < PG_VERSION_13
|
|
||||||
#define TYPALIGN_INT 'i'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PgGetObjectAddress gets the object address. This function is mostly copied from
|
* PgGetObjectAddress gets the object address. This function is mostly copied from
|
||||||
* pg_get_object_address of the PG code. We need to copy that function to use
|
* pg_get_object_address of the PG code. We need to copy that function to use
|
||||||
|
@ -283,6 +278,9 @@ PgGetObjectAddress(char *ttype, ArrayType *namearr, ArrayType *argsarr)
|
||||||
case OBJECT_FDW:
|
case OBJECT_FDW:
|
||||||
case OBJECT_FOREIGN_SERVER:
|
case OBJECT_FOREIGN_SERVER:
|
||||||
case OBJECT_LANGUAGE:
|
case OBJECT_LANGUAGE:
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
|
case OBJECT_PARAMETER_ACL:
|
||||||
|
#endif
|
||||||
case OBJECT_PUBLICATION:
|
case OBJECT_PUBLICATION:
|
||||||
case OBJECT_ROLE:
|
case OBJECT_ROLE:
|
||||||
case OBJECT_SCHEMA:
|
case OBJECT_SCHEMA:
|
||||||
|
@ -320,6 +318,9 @@ PgGetObjectAddress(char *ttype, ArrayType *namearr, ArrayType *argsarr)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
|
case OBJECT_PUBLICATION_NAMESPACE:
|
||||||
|
#endif
|
||||||
case OBJECT_USER_MAPPING:
|
case OBJECT_USER_MAPPING:
|
||||||
{
|
{
|
||||||
objnode = (Node *) list_make2(linitial(name), linitial(args));
|
objnode = (Node *) list_make2(linitial(name), linitial(args));
|
Loading…
Reference in New Issue