90#define ROLES_LIST_BLOOM_THRESHOLD 1024
92static const char *
getid(
const char *s,
char *n,
Node *escontext);
93static void putid(
char *p,
const char *s);
175 while (
isspace((
unsigned char) *s))
203 errmsg(
"identifier too long"),
204 errdetail(
"Identifier must be less than %d characters.",
210 while (
isspace((
unsigned char) *s))
227 for (src = s; *src; src++)
237 for (src = s; *src; src++)
292 errmsg(
"unrecognized key word: \"%s\"",
name),
293 errhint(
"ACL key word must be \"group\" or \"user\".")));
302 errhint(
"A name must follow the \"group\" or \"user\" key word.")));
308 errmsg(
"missing \"=\" sign")));
312 for (++s,
read = 0;
isalpha((
unsigned char) *s) || *s ==
'*'; s++)
367 errmsg(
"invalid mode character: must be one of \"%s\"",
394 if (
name2[0] ==
'\0')
397 errmsg(
"a name must follow the \"/\" sign")));
409 errmsg(
"defaulting grantor to user ID %u",
528 for (
i = 0;
i < num;
i++,
aip++)
595 errmsg(
"ACL array contains wrong data type")));
599 errmsg(
"ACL arrays must be one-dimensional")));
603 errmsg(
"ACL arrays must not contain null values")));
618 Node *escontext = fcinfo->context;
627 while (
isspace((
unsigned char) *s))
632 errmsg(
"extra garbage at the end of the ACL specification")));
715 return a1->ai_grantee ==
a2->ai_grantee &&
716 a1->ai_grantor ==
a2->ai_grantor;
729 if (
a1->ai_grantee >
a2->ai_grantee)
731 if (
a1->ai_grantee <
a2->ai_grantee)
733 if (
a1->ai_grantor >
a2->ai_grantor)
735 if (
a1->ai_grantor <
a2->ai_grantor)
737 if (
a1->ai_privs >
a2->ai_privs)
739 if (
a1->ai_privs <
a2->ai_privs)
754 result =
a1->ai_privs ==
a2->ai_privs &&
755 a1->ai_grantee ==
a2->ai_grantee &&
756 a1->ai_grantor ==
a2->ai_grantor;
871 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
889 aip->ai_grantor = ownerId;
906 aip->ai_grantee = ownerId;
907 aip->ai_grantor = ownerId;
1240 if (
mod_aip->ai_grantor == ownerId)
1251 for (
i = 0;
i < num;
i++)
1280 errmsg(
"grant options cannot be granted back to your own grantor")));
1330 for (
i = 0;
i < num;
i++)
1341 errmsg(
"dependent privileges exist"),
1342 errhint(
"Use CASCADE to revoke them too.")));
1427 for (
i = 0;
i < num;
i++)
1432 aidata->ai_grantee == roleid)
1448 for (
i = 0;
i < num;
i++)
1453 aidata->ai_grantee == roleid)
1515 for (
i = 0;
i < num;
i++)
1519 if (
aidata->ai_grantee == roleid)
1568 list[
j++] =
ai->ai_grantee;
1571 list[
j++] =
ai->ai_grantor;
1596 errmsg(
"aclinsert is no longer supported")));
1606 errmsg(
"aclremove is no longer supported")));
1623 for (
i = 0;
i < num; ++
i)
1625 if (
aip->ai_grantee ==
aidat[
i].ai_grantee &&
1626 aip->ai_grantor ==
aidat[
i].ai_grantor &&
1725 errmsg(
"unrecognized privilege type: \"%s\"",
chunk)));
1749 return "REFERENCES";
1765 return "ALTER SYSTEM";
1857 bool nulls[4] = {0};
2121 errmsg(
"\"%s\" is not a sequence",
2151 errmsg(
"\"%s\" is not a sequence",
2179 if (relkind ==
'\0')
2184 errmsg(
"\"%s\" is not a sequence",
2215 if (relkind ==
'\0')
2220 errmsg(
"\"%s\" is not a sequence",
2251 errmsg(
"\"%s\" is not a sequence",
2277 if (relkind ==
'\0')
2282 errmsg(
"\"%s\" is not a sequence",
2932 if (tablename !=
NULL)
2937 errmsg(
"column \"%s\" of relation \"%s\" does not exist",
2938 colname, tablename)));
5094 unsigned char *
roleptr = (
unsigned char *) &role;
5346 errmsg(
"must be able to SET ROLE \"%s\"",
5477 const Acl *acl,
Oid ownerId,
5609 errmsg(
"role \"%s\" does not exist",
"public")));
5656 errmsg(
"role \"%s\" does not exist",
"public")));
5706 errmsg(
"role name \"%s\" is reserved",
5712 errmsg(
"role name \"%s\" is reserved",
Datum idx(PG_FUNCTION_ARGS)
static List * roles_is_member_of(Oid roleid, enum RoleRecurseType type, Oid admin_of, Oid *admin_role)
Datum pg_has_role_id_id(PG_FUNCTION_ARGS)
Datum has_schema_privilege_id(PG_FUNCTION_ARGS)
Datum has_largeobject_privilege_id_id(PG_FUNCTION_ARGS)
Datum hash_aclitem(PG_FUNCTION_ARGS)
void initialize_acl(void)
Datum has_sequence_privilege_name(PG_FUNCTION_ARGS)
Datum has_table_privilege_id_id(PG_FUNCTION_ARGS)
Datum has_server_privilege_id(PG_FUNCTION_ARGS)
Datum has_tablespace_privilege_id_id(PG_FUNCTION_ARGS)
Datum has_column_privilege_id_id_attnum(PG_FUNCTION_ARGS)
Datum has_server_privilege_name_name(PG_FUNCTION_ARGS)
Datum aclinsert(PG_FUNCTION_ARGS)
static AclMode convert_function_priv_string(text *priv_type_text)
Datum has_largeobject_privilege_name_id(PG_FUNCTION_ARGS)
static const char * getid(const char *s, char *n, Node *escontext)
bool is_admin_of_role(Oid member, Oid role)
Datum has_column_privilege_id_name(PG_FUNCTION_ARGS)
static bool aclitem_match(const AclItem *a1, const AclItem *a2)
Datum pg_has_role_name_name(PG_FUNCTION_ARGS)
Datum has_language_privilege_name_name(PG_FUNCTION_ARGS)
Acl * aclconcat(const Acl *left_acl, const Acl *right_acl)
Datum has_schema_privilege_name_name(PG_FUNCTION_ARGS)
Acl * aclmerge(const Acl *left_acl, const Acl *right_acl, Oid ownerId)
Datum aclitem_eq(PG_FUNCTION_ARGS)
Datum has_tablespace_privilege_name_id(PG_FUNCTION_ARGS)
Datum makeaclitem(PG_FUNCTION_ARGS)
Datum has_table_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_server_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_column_privilege_name_id_attnum(PG_FUNCTION_ARGS)
Datum has_language_privilege_id_name(PG_FUNCTION_ARGS)
static int column_privilege_check(Oid tableoid, AttrNumber attnum, Oid roleid, AclMode mode)
static Oid convert_type_name(text *typename)
Oid select_best_admin(Oid member, Oid role)
Datum aclexplode(PG_FUNCTION_ARGS)
static Oid convert_database_name(text *databasename)
Acl * acldefault(ObjectType objtype, Oid ownerId)
Datum aclitemout(PG_FUNCTION_ARGS)
Oid get_role_oid_or_public(const char *rolname)
Datum has_foreign_data_wrapper_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_foreign_data_wrapper_privilege_id_id(PG_FUNCTION_ARGS)
bool aclequal(const Acl *left_acl, const Acl *right_acl)
Datum hash_aclitem_extended(PG_FUNCTION_ARGS)
static void check_acl(const Acl *acl)
Datum has_parameter_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_foreign_data_wrapper_privilege_id(PG_FUNCTION_ARGS)
#define ROLES_LIST_BLOOM_THRESHOLD
Datum has_database_privilege_name(PG_FUNCTION_ARGS)
static uint32 cached_db_hash
Datum has_type_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_column_privilege_name_name_name(PG_FUNCTION_ARGS)
Datum pg_has_role_name(PG_FUNCTION_ARGS)
Datum has_sequence_privilege_id(PG_FUNCTION_ARGS)
static AclMode convert_largeobject_priv_string(text *priv_type_text)
static List * roles_list_append(List *roles_list, bloom_filter **bf, Oid role)
static AclMode convert_type_priv_string(text *priv_type_text)
Datum has_tablespace_privilege_name(PG_FUNCTION_ARGS)
static AclMode convert_table_priv_string(text *priv_type_text)
static AclMode convert_server_priv_string(text *priv_type_text)
Datum has_table_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_foreign_data_wrapper_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_tablespace_privilege_id_name(PG_FUNCTION_ARGS)
Acl * aclupdate(const Acl *old_acl, const AclItem *mod_aip, int modechg, Oid ownerId, DropBehavior behavior)
static Acl * recursive_revoke(Acl *acl, Oid grantee, AclMode revoke_privs, Oid ownerId, DropBehavior behavior)
static void RoleMembershipCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
Datum has_database_privilege_name_id(PG_FUNCTION_ARGS)
static Oid convert_schema_name(text *schemaname)
Datum has_column_privilege_name_name(PG_FUNCTION_ARGS)
static void putid(char *p, const char *s)
Datum has_schema_privilege_id_name(PG_FUNCTION_ARGS)
static void check_circularity(const Acl *old_acl, const AclItem *mod_aip, Oid ownerId)
static bool has_param_priv_byname(Oid roleid, const text *parameter, AclMode priv)
bool is_member_of_role(Oid member, Oid role)
Datum has_sequence_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_database_privilege_id_name(PG_FUNCTION_ARGS)
static Oid convert_foreign_data_wrapper_name(text *fdwname)
Datum has_language_privilege_id(PG_FUNCTION_ARGS)
static AclMode convert_database_priv_string(text *priv_type_text)
Datum has_foreign_data_wrapper_privilege_name(PG_FUNCTION_ARGS)
Datum has_column_privilege_name_attnum(PG_FUNCTION_ARGS)
Datum has_column_privilege_id_attnum(PG_FUNCTION_ARGS)
Datum has_type_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_any_column_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_server_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_language_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_foreign_data_wrapper_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_schema_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_function_privilege_name_name(PG_FUNCTION_ARGS)
void select_best_grantor(Oid roleId, AclMode privileges, const Acl *acl, Oid ownerId, Oid *grantorId, AclMode *grantOptions)
Datum has_any_column_privilege_name_name(PG_FUNCTION_ARGS)
bool is_member_of_role_nosuper(Oid member, Oid role)
Datum has_sequence_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_schema_privilege_name(PG_FUNCTION_ARGS)
Datum acldefault_sql(PG_FUNCTION_ARGS)
bool has_privs_of_role(Oid member, Oid role)
Acl * make_empty_acl(void)
static Oid convert_language_name(text *languagename)
Datum has_language_privilege_id_id(PG_FUNCTION_ARGS)
static AclMode convert_any_priv_string(text *priv_type_text, const priv_map *privileges)
Datum has_database_privilege_id_id(PG_FUNCTION_ARGS)
Datum has_function_privilege_name(PG_FUNCTION_ARGS)
static bool is_safe_acl_char(unsigned char c, bool is_getid)
int aclmembers(const Acl *acl, Oid **roleids)
Datum has_language_privilege_name(PG_FUNCTION_ARGS)
Acl * aclnewowner(const Acl *old_acl, Oid oldOwnerId, Oid newOwnerId)
Datum has_server_privilege_name(PG_FUNCTION_ARGS)
bool member_can_set_role(Oid member, Oid role)
Datum aclremove(PG_FUNCTION_ARGS)
static const char * convert_aclright_to_string(int aclright)
Acl * aclcopy(const Acl *orig_acl)
Datum has_function_privilege_id(PG_FUNCTION_ARGS)
void aclitemsort(Acl *acl)
Datum has_table_privilege_id(PG_FUNCTION_ARGS)
Datum has_function_privilege_id_id(PG_FUNCTION_ARGS)
AclMode aclmask(const Acl *acl, Oid roleid, Oid ownerId, AclMode mask, AclMaskHow how)
static Oid convert_server_name(text *servername)
static Oid convert_tablespace_name(text *tablespacename)
Datum has_column_privilege_name_name_attnum(PG_FUNCTION_ARGS)
static AclMode convert_parameter_priv_string(text *priv_text)
static Oid convert_table_name(text *tablename)
Datum has_column_privilege_name_id_name(PG_FUNCTION_ARGS)
static AclMode convert_tablespace_priv_string(text *priv_type_text)
static AclMode convert_language_priv_string(text *priv_type_text)
Datum aclitemin(PG_FUNCTION_ARGS)
static AclMode convert_sequence_priv_string(text *priv_type_text)
Datum pg_has_role_id(PG_FUNCTION_ARGS)
Datum has_parameter_privilege_id_name(PG_FUNCTION_ARGS)
static Acl * allocacl(int n)
static AttrNumber convert_column_name(Oid tableoid, text *column)
static AclMode convert_role_priv_string(text *priv_type_text)
static bool has_lo_priv_byid(Oid roleid, Oid lobjId, AclMode priv, bool *is_missing)
Oid get_role_oid(const char *rolname, bool missing_ok)
Datum has_tablespace_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_parameter_privilege_name(PG_FUNCTION_ARGS)
Datum has_any_column_privilege_name(PG_FUNCTION_ARGS)
Datum has_sequence_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_function_privilege_name_id(PG_FUNCTION_ARGS)
Datum has_type_privilege_id_id(PG_FUNCTION_ARGS)
char * get_rolespec_name(const RoleSpec *role)
Datum has_server_privilege_id_id(PG_FUNCTION_ARGS)
static AclResult pg_role_aclcheck(Oid role_oid, Oid roleid, AclMode mode)
Datum has_function_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_table_privilege_name(PG_FUNCTION_ARGS)
Datum has_type_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_column_privilege_id_name_attnum(PG_FUNCTION_ARGS)
void check_can_set_role(Oid member, Oid role)
static const char * aclparse(const char *s, AclItem *aip, Node *escontext)
void check_rolespec_name(const RoleSpec *role, const char *detail_msg)
Datum has_type_privilege_name(PG_FUNCTION_ARGS)
static List * cached_roles[]
static AclMode aclmask_direct(const Acl *acl, Oid roleid, Oid ownerId, AclMode mask, AclMaskHow how)
Datum has_tablespace_privilege_id(PG_FUNCTION_ARGS)
Datum pg_has_role_name_id(PG_FUNCTION_ARGS)
Datum aclcontains(PG_FUNCTION_ARGS)
static Oid convert_function_name(text *functionname)
Datum has_column_privilege_id_name_name(PG_FUNCTION_ARGS)
Datum has_schema_privilege_id_id(PG_FUNCTION_ARGS)
Oid get_rolespec_oid(const RoleSpec *role, bool missing_ok)
Datum has_any_column_privilege_id_name(PG_FUNCTION_ARGS)
Datum has_largeobject_privilege_id(PG_FUNCTION_ARGS)
Datum has_database_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_column_privilege_id_id_name(PG_FUNCTION_ARGS)
static AclMode convert_schema_priv_string(text *priv_type_text)
Datum has_table_privilege_name_name(PG_FUNCTION_ARGS)
Datum has_any_column_privilege_id_id(PG_FUNCTION_ARGS)
static AclMode convert_foreign_data_wrapper_priv_string(text *priv_type_text)
Datum has_database_privilege_id(PG_FUNCTION_ARGS)
static int aclitemComparator(const void *arg1, const void *arg2)
Datum has_type_privilege_id(PG_FUNCTION_ARGS)
Datum has_any_column_privilege_id(PG_FUNCTION_ARGS)
Datum pg_has_role_id_name(PG_FUNCTION_ARGS)
Datum has_sequence_privilege_id_id(PG_FUNCTION_ARGS)
HeapTuple get_rolespec_tuple(const RoleSpec *role)
static AclMode convert_column_priv_string(text *priv_type_text)
#define PG_RETURN_ACLITEM_P(x)
#define ACL_ALL_RIGHTS_STR
#define ACL_REFERENCES_CHR
#define ACLITEM_ALL_GOPTION_BITS
#define PG_GETARG_ACLITEM_P(n)
#define ACL_ALL_RIGHTS_FOREIGN_SERVER
#define ACL_ALL_RIGHTS_TABLESPACE
#define ACLITEM_GET_PRIVS(item)
#define ACL_ALL_RIGHTS_PARAMETER_ACL
#define ACL_ALL_RIGHTS_SCHEMA
#define ACL_ALL_RIGHTS_SEQUENCE
#define ACL_ALL_RIGHTS_DATABASE
#define ACL_OPTION_TO_PRIVS(privs)
#define ACL_ALL_RIGHTS_FUNCTION
#define ACL_ALL_RIGHTS_LANGUAGE
#define ACL_ALL_RIGHTS_TYPE
#define ACL_ALTER_SYSTEM_CHR
#define ACL_ALL_RIGHTS_FDW
#define ACLITEM_SET_PRIVS_GOPTIONS(item, privs, goptions)
#define PG_GETARG_ACL_P(n)
#define ACLITEM_GET_GOPTIONS(item)
#define ACLITEM_GET_RIGHTS(item)
#define ACL_ALL_RIGHTS_RELATION
#define ACL_ALL_RIGHTS_LARGEOBJECT
#define PG_RETURN_ACL_P(x)
#define ACL_CREATE_TEMP_CHR
#define ACL_GRANT_OPTION_FOR(privs)
#define ACLITEM_SET_RIGHTS(item, rights)
AclResult object_aclcheck_ext(Oid classid, Oid objectid, Oid roleid, AclMode mode, bool *is_missing)
AclResult pg_largeobject_aclcheck_snapshot(Oid lobj_oid, Oid roleid, AclMode mode, Snapshot snapshot)
AclResult pg_class_aclcheck_ext(Oid table_oid, Oid roleid, AclMode mode, bool *is_missing)
AclResult pg_attribute_aclcheck_all_ext(Oid table_oid, Oid roleid, AclMode mode, AclMaskHow how, bool *is_missing)
AclResult pg_attribute_aclcheck_all(Oid table_oid, Oid roleid, AclMode mode, AclMaskHow how)
AclResult pg_parameter_aclcheck(const char *name, Oid roleid, AclMode mode)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
AclResult pg_attribute_aclcheck_ext(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mode, bool *is_missing)
AclResult pg_class_aclcheck(Oid table_oid, Oid roleid, AclMode mode)
#define InvalidAttrNumber
Oid get_tablespace_oid(const char *tablespacename, bool missing_ok)
void bloom_free(bloom_filter *filter)
bloom_filter * bloom_create(int64 total_elems, int bloom_work_mem, uint64 seed)
bool bloom_lacks_element(bloom_filter *filter, unsigned char *elem, size_t len)
void bloom_add_element(bloom_filter *filter, unsigned char *elem, size_t len)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define IS_HIGHBIT_SET(ch)
#define Assert(condition)
#define OidIsValid(objectId)
bool IsReservedName(const char *name)
Oid get_database_oid(const char *dbname, bool missing_ok)
int errdetail_internal(const char *fmt,...)
int errdetail(const char *fmt,...)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
#define palloc_object(type)
#define palloc_array(type, count)
#define PG_RETURN_UINT32(x)
#define PG_GETARG_TEXT_PP(n)
#define PG_GETARG_CHAR(n)
#define PG_RETURN_CSTRING(x)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_CSTRING(n)
#define PG_GETARG_INT64(n)
#define PG_GETARG_NAME(n)
#define PG_GETARG_BOOL(n)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_INT16(n)
Oid get_foreign_server_oid(const char *servername, bool missing_ok)
Oid get_foreign_data_wrapper_oid(const char *fdwname, bool missing_ok)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
static Datum hash_uint32_extended(uint32 k, uint64 seed)
static const FormData_pg_attribute a1
static const FormData_pg_attribute a2
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
bool lo_compat_privileges
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
List * list_copy(const List *oldlist)
List * lappend_oid(List *list, Oid datum)
void list_free(List *list)
bool list_member_oid(const List *list, Oid datum)
char * get_rel_name(Oid relid)
char get_rel_relkind(Oid relid)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext TopMemoryContext
#define IsBootstrapProcessingMode()
Oid GetSessionUserId(void)
char * GetUserNameFromId(Oid roleid, bool noerr)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
RangeVar * makeRangeVarFromNameList(const List *names)
#define RangeVarGetRelid(relation, lockmode, missing_ok)
int oid_cmp(const void *p1, const void *p2)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
FormData_pg_attribute * Form_pg_attribute
FormData_pg_auth_members * Form_pg_auth_members
FormData_pg_authid * Form_pg_authid
int pg_popcount64(uint64 word)
static PgChecksumMode mode
FormData_pg_database * Form_pg_database
bool LargeObjectExistsWithSnapshot(Oid loid, Snapshot snapshot)
static int list_length(const List *l)
#define list_make1_oid(x1)
#define foreach_oid(var, lst)
int pg_strcasecmp(const char *s1, const char *s2)
#define qsort(a, b, c, d)
static Oid DatumGetObjectId(Datum X)
static Datum UInt64GetDatum(uint64 X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
Oid get_language_oid(const char *langname, bool missing_ok)
static size_t qunique(void *array, size_t elements, size_t width, int(*compare)(const void *, const void *))
Datum regtypein(PG_FUNCTION_ARGS)
Datum regprocedurein(PG_FUNCTION_ARGS)
Snapshot GetActiveSnapshot(void)
bool superuser_arg(Oid roleid)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
HeapTuple SearchSysCache2(int cacheId, Datum key1, Datum key2)
#define ReleaseSysCacheList(x)
#define SearchSysCacheList1(cacheId, key1)
#define GetSysCacheHashValue1(cacheId, key1)
#define GetSysCacheOid1(cacheId, oidcol, key1)
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
static void SET_VARSIZE(void *PTR, Size len)
char * text_to_cstring(const text *t)
List * textToQualifiedNameList(text *textval)