85 #include "utils/fmgroids.h"
123 AccessMethodRelationId,
136 "access method operator",
137 AccessMethodOperatorRelationId,
138 AccessMethodOperatorOidIndexId,
150 "access method procedure",
151 AccessMethodProcedureRelationId,
152 AccessMethodProcedureOidIndexId,
183 Anum_pg_collation_oid,
184 Anum_pg_collation_collname,
185 Anum_pg_collation_collnamespace,
186 Anum_pg_collation_collowner,
193 ConstraintRelationId,
194 ConstraintOidIndexId,
197 Anum_pg_constraint_oid,
198 Anum_pg_constraint_conname,
199 Anum_pg_constraint_connamespace,
207 ConversionRelationId,
208 ConversionOidIndexId,
211 Anum_pg_conversion_oid,
212 Anum_pg_conversion_conname,
213 Anum_pg_conversion_connamespace,
214 Anum_pg_conversion_conowner,
225 Anum_pg_database_oid,
226 Anum_pg_database_datname,
228 Anum_pg_database_datdba,
229 Anum_pg_database_datacl,
235 DefaultAclRelationId,
236 DefaultAclOidIndexId,
239 Anum_pg_default_acl_oid,
253 Anum_pg_extension_oid,
254 Anum_pg_extension_extname,
256 Anum_pg_extension_extowner,
262 "foreign-data wrapper",
263 ForeignDataWrapperRelationId,
264 ForeignDataWrapperOidIndexId,
265 FOREIGNDATAWRAPPEROID,
266 FOREIGNDATAWRAPPERNAME,
267 Anum_pg_foreign_data_wrapper_oid,
268 Anum_pg_foreign_data_wrapper_fdwname,
270 Anum_pg_foreign_data_wrapper_fdwowner,
271 Anum_pg_foreign_data_wrapper_fdwacl,
277 ForeignServerRelationId,
278 ForeignServerOidIndexId,
281 Anum_pg_foreign_server_oid,
282 Anum_pg_foreign_server_srvname,
284 Anum_pg_foreign_server_srvowner,
285 Anum_pg_foreign_server_srvacl,
296 Anum_pg_proc_proname,
297 Anum_pg_proc_pronamespace,
298 Anum_pg_proc_proowner,
309 Anum_pg_language_oid,
310 Anum_pg_language_lanname,
312 Anum_pg_language_lanowner,
313 Anum_pg_language_lanacl,
318 "large object metadata",
319 LargeObjectMetadataRelationId,
320 LargeObjectMetadataOidIndexId,
323 Anum_pg_largeobject_metadata_oid,
326 Anum_pg_largeobject_metadata_lomowner,
327 Anum_pg_largeobject_metadata_lomacl,
333 OperatorClassRelationId,
338 Anum_pg_opclass_opcname,
339 Anum_pg_opclass_opcnamespace,
340 Anum_pg_opclass_opcowner,
351 Anum_pg_operator_oid,
352 Anum_pg_operator_oprname,
353 Anum_pg_operator_oprnamespace,
354 Anum_pg_operator_oprowner,
361 OperatorFamilyRelationId,
365 Anum_pg_opfamily_oid,
366 Anum_pg_opfamily_opfname,
367 Anum_pg_opfamily_opfnamespace,
368 Anum_pg_opfamily_opfowner,
380 Anum_pg_authid_rolname,
393 Anum_pg_auth_members_oid,
396 Anum_pg_auth_members_grantor,
408 Anum_pg_rewrite_rulename,
421 Anum_pg_namespace_oid,
422 Anum_pg_namespace_nspname,
424 Anum_pg_namespace_nspowner,
425 Anum_pg_namespace_nspacl,
436 Anum_pg_class_relname,
437 Anum_pg_class_relnamespace,
438 Anum_pg_class_relowner,
439 Anum_pg_class_relacl,
445 TableSpaceRelationId,
446 TablespaceOidIndexId,
449 Anum_pg_tablespace_oid,
450 Anum_pg_tablespace_spcname,
452 Anum_pg_tablespace_spcowner,
453 Anum_pg_tablespace_spcacl,
463 Anum_pg_transform_oid,
478 Anum_pg_trigger_tgname,
492 Anum_pg_policy_polname,
501 EventTriggerRelationId,
502 EventTriggerOidIndexId,
505 Anum_pg_event_trigger_oid,
506 Anum_pg_event_trigger_evtname,
508 Anum_pg_event_trigger_evtowner,
514 "text search configuration",
519 Anum_pg_ts_config_oid,
520 Anum_pg_ts_config_cfgname,
521 Anum_pg_ts_config_cfgnamespace,
522 Anum_pg_ts_config_cfgowner,
528 "text search dictionary",
529 TSDictionaryRelationId,
530 TSDictionaryOidIndexId,
534 Anum_pg_ts_dict_dictname,
535 Anum_pg_ts_dict_dictnamespace,
536 Anum_pg_ts_dict_dictowner,
542 "text search parser",
547 Anum_pg_ts_parser_oid,
548 Anum_pg_ts_parser_prsname,
549 Anum_pg_ts_parser_prsnamespace,
556 "text search template",
557 TSTemplateRelationId,
558 TSTemplateOidIndexId,
561 Anum_pg_ts_template_oid,
562 Anum_pg_ts_template_tmplname,
563 Anum_pg_ts_template_tmplnamespace,
576 Anum_pg_type_typname,
577 Anum_pg_type_typnamespace,
578 Anum_pg_type_typowner,
585 PublicationRelationId,
586 PublicationObjectIndexId,
589 Anum_pg_publication_oid,
590 Anum_pg_publication_pubname,
592 Anum_pg_publication_pubowner,
599 SubscriptionRelationId,
600 SubscriptionObjectIndexId,
603 Anum_pg_subscription_oid,
604 Anum_pg_subscription_subname,
606 Anum_pg_subscription_subowner,
612 "extended statistics",
613 StatisticExtRelationId,
614 StatisticExtOidIndexId,
617 Anum_pg_statistic_ext_oid,
618 Anum_pg_statistic_ext_stxname,
619 Anum_pg_statistic_ext_stxnamespace,
620 Anum_pg_statistic_ext_stxowner,
627 UserMappingRelationId,
628 UserMappingOidIndexId,
631 Anum_pg_user_mapping_oid,
689 "sequence column", -1
692 "toast table column", -1
698 "materialized view column", -1
701 "composite type column", -1
785 "role membership", -1
845 String *strval,
bool missing_ok);
848 LOCKMODE lockmode,
bool missing_ok);
853 LOCKMODE lockmode,
bool missing_ok);
858 TypeName *
typename,
bool missing_ok);
862 List *
object,
bool missing_ok);
880 int32 objectSubId,
bool missing_ok);
974 &relation, missing_ok);
988 address.
classId = ConstraintRelationId;
990 constrname, missing_ok);
1018 address.
classId = ProcedureRelationId;
1023 address.
classId = OperatorRelationId;
1028 address.
classId = CollationRelationId;
1033 address.
classId = ConversionRelationId;
1046 address.
classId = LargeObjectRelationId;
1053 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1054 errmsg(
"large object %u does not exist",
1067 address.
classId = CastRelationId;
1080 address.
classId = TransformRelationId;
1087 address.
classId = TSParserRelationId;
1092 address.
classId = TSDictionaryRelationId;
1097 address.
classId = TSTemplateRelationId;
1102 address.
classId = TSConfigRelationId;
1124 address.
classId = StatisticExtRelationId;
1133 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1155 if (old_address.
classId != RelationRelationId)
1172 if (address.
classId != RelationRelationId)
1204 old_address = address;
1234 relp, lockmode, missing_ok);
1243 String *strval,
bool missing_ok)
1254 address.
classId = AccessMethodRelationId;
1259 address.
classId = DatabaseRelationId;
1264 address.
classId = ExtensionRelationId;
1269 address.
classId = TableSpaceRelationId;
1274 address.
classId = AuthIdRelationId;
1279 address.
classId = NamespaceRelationId;
1284 address.
classId = LanguageRelationId;
1289 address.
classId = ForeignDataWrapperRelationId;
1294 address.
classId = ForeignServerRelationId;
1299 address.
classId = EventTriggerRelationId;
1304 address.
classId = ParameterAclRelationId;
1309 address.
classId = PublicationRelationId;
1314 address.
classId = SubscriptionRelationId;
1319 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1340 address.
classId = RelationRelationId;
1345 lockmode, missing_ok);
1352 if (relation->
rd_rel->relkind != RELKIND_INDEX &&
1353 relation->
rd_rel->relkind != RELKIND_PARTITIONED_INDEX)
1355 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1356 errmsg(
"\"%s\" is not an index",
1360 if (relation->
rd_rel->relkind != RELKIND_SEQUENCE)
1362 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1363 errmsg(
"\"%s\" is not a sequence",
1367 if (relation->
rd_rel->relkind != RELKIND_RELATION &&
1368 relation->
rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
1370 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1371 errmsg(
"\"%s\" is not a table",
1375 if (relation->
rd_rel->relkind != RELKIND_VIEW)
1377 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1378 errmsg(
"\"%s\" is not a view",
1382 if (relation->
rd_rel->relkind != RELKIND_MATVIEW)
1384 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1385 errmsg(
"\"%s\" is not a materialized view",
1389 if (relation->
rd_rel->relkind != RELKIND_FOREIGN_TABLE)
1391 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1392 errmsg(
"\"%s\" is not a foreign table",
1396 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1421 const char *depname;
1432 (
errcode(ERRCODE_SYNTAX_ERROR),
1433 errmsg(
"must specify relation and object name")));
1446 address.
classId = RewriteRelationId;
1452 address.
classId = TriggerRelationId;
1458 address.
classId = ConstraintRelationId;
1465 address.
classId = PolicyRelationId;
1472 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1478 if (relation != NULL)
1508 (
errcode(ERRCODE_SYNTAX_ERROR),
1509 errmsg(
"column name must be qualified")));
1522 (
errcode(ERRCODE_UNDEFINED_COLUMN),
1523 errmsg(
"column \"%s\" of relation \"%s\" does not exist",
1526 address.
classId = RelationRelationId;
1533 address.
classId = RelationRelationId;
1561 (
errcode(ERRCODE_SYNTAX_ERROR),
1562 errmsg(
"column name must be qualified")));
1580 (
errcode(ERRCODE_UNDEFINED_COLUMN),
1581 errmsg(
"default value for column \"%s\" of relation \"%s\" does not exist",
1584 address.
classId = AttrDefaultRelationId;
1591 address.
classId = AttrDefaultRelationId;
1608 address.
classId = TypeRelationId;
1617 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1618 errmsg(
"type \"%s\" does not exist",
1628 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1629 errmsg(
"\"%s\" is not a domain",
1654 address.
classId = OperatorClassRelationId;
1659 address.
classId = OperatorFamilyRelationId;
1664 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1681 List *
object,
bool missing_ok)
1707 foreach(cell,
lsecond(
object))
1736 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1737 errmsg(
"operator %d (%s, %s) of %s does not exist",
1767 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1768 errmsg(
"function %d (%s, %s) of %s does not exist",
1782 elog(
ERROR,
"unrecognized object type: %d", (
int) objtype);
1808 if (strcmp(
username,
"public") == 0)
1818 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1819 errmsg(
"user mapping for user \"%s\" on server \"%s\" does not exist",
1833 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1834 errmsg(
"server \"%s\" does not exist", servername)));
1844 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1845 errmsg(
"user mapping for user \"%s\" on server \"%s\" does not exist",
1900 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1901 errmsg(
"publication relation \"%s\" in publication \"%s\" does not exist",
1942 Anum_pg_publication_namespace_oid,
1947 (
errcode(ERRCODE_UNDEFINED_OBJECT),
1948 errmsg(
"publication schema \"%s\" in publication \"%s\" does not exist",
1949 schemaname, pubname)));
1988 case DEFACLOBJ_RELATION:
1989 objtype_str =
"tables";
1991 case DEFACLOBJ_SEQUENCE:
1992 objtype_str =
"sequences";
1994 case DEFACLOBJ_FUNCTION:
1995 objtype_str =
"functions";
1997 case DEFACLOBJ_TYPE:
1998 objtype_str =
"types";
2000 case DEFACLOBJ_NAMESPACE:
2001 objtype_str =
"schemas";
2005 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2006 errmsg(
"unrecognized default ACL object type \"%c\"", objtype),
2007 errhint(
"Valid object types are \"%c\", \"%c\", \"%c\", \"%c\", \"%c\".",
2012 DEFACLOBJ_NAMESPACE)));
2057 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2058 errmsg(
"default ACL for user \"%s\" in schema \"%s\" on %s does not exist",
2062 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2063 errmsg(
"default ACL for user \"%s\" on %s does not exist",
2084 for (
i = 0;
i < nelems;
i++)
2088 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2089 errmsg(
"name or argument lists may not contain nulls")));
2110 Node *objnode = NULL;
2122 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2123 errmsg(
"unsupported object type \"%s\"", ttype)));
2141 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2142 errmsg(
"name list length must be exactly %d", 1)));
2145 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2146 errmsg(
"name or argument lists may not contain nulls")));
2158 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2159 errmsg(
"name list length must be exactly %d", 1)));
2162 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2163 errmsg(
"large object OID may not be null")));
2171 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2172 errmsg(
"name list length must be at least %d", 1)));
2196 for (
i = 0;
i < nelems;
i++)
2200 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2201 errmsg(
"name or argument lists may not contain nulls")));
2223 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2224 errmsg(
"name list length must be exactly %d", 1)));
2234 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2235 errmsg(
"argument list length must be exactly %d", 1)));
2241 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2242 errmsg(
"name list length must be at least %d", 2)));
2248 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2249 errmsg(
"name list length must be at least %d", 3)));
2255 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2256 errmsg(
"argument list length must be exactly %d", 2)));
2307 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2308 errmsg(
"name list length must be exactly %d", 1)));
2313 objnode = (
Node *)
typename;
2344 objnode = (
Node *) owa;
2353 if (objnode == NULL)
2364 elog(
ERROR,
"return type must be a row type");
2416 elog(
ERROR,
"constraint with OID %u does not exist",
2469 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2470 errmsg(
"must be owner of large object %u",
2484 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2485 errmsg(
"must be owner of type %s or type %s",
2511 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2512 errmsg(
"permission denied"),
2513 errdetail(
"The current user must have the %s attribute.",
2520 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2521 errmsg(
"permission denied"),
2522 errdetail(
"The current user must have the %s attribute.",
2526 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2527 errmsg(
"permission denied"),
2528 errdetail(
"The current user must have the %s option on role \"%s\".",
2541 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2542 errmsg(
"must be superuser")));
2552 elog(
ERROR,
"unsupported object type: %d", (
int) objtype);
2577 cache =
property->oid_catcache_id;
2583 elog(
ERROR,
"cache lookup failed for cache %d oid %u",
2610 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2611 errmsg(
"unrecognized object type \"%s\"", objtype)));
2755 if (prop_last && prop_last->
class_oid == class_id)
2831 char **pubname,
char **nspname)
2841 elog(
ERROR,
"cache lookup failed for publication schema %u",
2857 Oid schemaid = pnform->pnnspid;
2862 elog(
ERROR,
"cache lookup failed for schema %u",
2886 case RelationRelationId:
2909 case ProcedureRelationId:
2922 case TypeRelationId:
2935 case CastRelationId:
2958 elog(
ERROR,
"could not find tuple for cast %u",
2977 case CollationRelationId:
2988 elog(
ERROR,
"cache lookup failed for collation %u",
3008 case ConstraintRelationId:
3018 elog(
ERROR,
"cache lookup failed for constraint %u",
3046 case ConversionRelationId:
3057 elog(
ERROR,
"cache lookup failed for conversion %u",
3077 case AttrDefaultRelationId:
3086 elog(
ERROR,
"could not find tuple for attrdef %u",
3097 case LanguageRelationId:
3108 case LargeObjectRelationId:
3115 case OperatorRelationId:
3121 if (oprname == NULL)
3128 case OperatorClassRelationId:
3141 elog(
ERROR,
"cache lookup failed for opclass %u",
3151 elog(
ERROR,
"cache lookup failed for access method %u",
3152 opcForm->opcmethod);
3171 case OperatorFamilyRelationId:
3175 case AccessMethodRelationId:
3184 elog(
ERROR,
"cache lookup failed for access method %u",
3195 case AccessMethodOperatorRelationId:
3204 amopDesc =
table_open(AccessMethodOperatorRelationId,
3220 elog(
ERROR,
"could not find tuple for amop entry %u",
3239 amopForm->amopstrategy,
3252 case AccessMethodProcedureRelationId:
3261 amprocDesc =
table_open(AccessMethodProcedureRelationId,
3277 elog(
ERROR,
"could not find tuple for amproc entry %u",
3296 amprocForm->amprocnum,
3309 case RewriteRelationId:
3321 Anum_pg_rewrite_oid,
3333 elog(
ERROR,
"could not find tuple for rule %u",
3355 case TriggerRelationId:
3367 Anum_pg_trigger_oid,
3379 elog(
ERROR,
"could not find tuple for trigger %u",
3401 case NamespaceRelationId:
3409 elog(
ERROR,
"cache lookup failed for namespace %u",
3417 case StatisticExtRelationId:
3428 elog(
ERROR,
"could not find tuple for statistics object %u",
3449 case TSParserRelationId:
3460 elog(
ERROR,
"cache lookup failed for text search parser %u",
3479 case TSDictionaryRelationId:
3490 elog(
ERROR,
"cache lookup failed for text search dictionary %u",
3505 NameStr(dictForm->dictname)));
3510 case TSTemplateRelationId:
3521 elog(
ERROR,
"cache lookup failed for text search template %u",
3536 NameStr(tmplForm->tmplname)));
3541 case TSConfigRelationId:
3552 elog(
ERROR,
"cache lookup failed for text search configuration %u",
3572 case AuthIdRelationId:
3582 case AuthMemRelationId:
3593 Anum_pg_auth_members_oid,
3605 elog(
ERROR,
"could not find tuple for role membership %u",
3624 case DatabaseRelationId:
3632 elog(
ERROR,
"cache lookup failed for database %u",
3640 case TableSpaceRelationId:
3648 elog(
ERROR,
"cache lookup failed for tablespace %u",
3656 case ForeignDataWrapperRelationId:
3667 case ForeignServerRelationId:
3677 case UserMappingRelationId:
3690 elog(
ERROR,
"cache lookup failed for user mapping %u",
3696 useid = umform->umuser;
3711 case DefaultAclRelationId:
3724 Anum_pg_default_acl_oid,
3729 true, NULL, 1, skey);
3736 elog(
ERROR,
"could not find tuple for default ACL %u",
3753 switch (defacl->defaclobjtype)
3755 case DEFACLOBJ_RELATION:
3758 _(
"default privileges on new relations belonging to role %s in schema %s"),
3762 _(
"default privileges on new relations belonging to role %s"),
3765 case DEFACLOBJ_SEQUENCE:
3768 _(
"default privileges on new sequences belonging to role %s in schema %s"),
3772 _(
"default privileges on new sequences belonging to role %s"),
3775 case DEFACLOBJ_FUNCTION:
3778 _(
"default privileges on new functions belonging to role %s in schema %s"),
3782 _(
"default privileges on new functions belonging to role %s"),
3785 case DEFACLOBJ_TYPE:
3788 _(
"default privileges on new types belonging to role %s in schema %s"),
3792 _(
"default privileges on new types belonging to role %s"),
3795 case DEFACLOBJ_NAMESPACE:
3798 _(
"default privileges on new schemas belonging to role %s"),
3805 _(
"default privileges belonging to role %s in schema %s"),
3809 _(
"default privileges belonging to role %s"),
3819 case ExtensionRelationId:
3827 elog(
ERROR,
"cache lookup failed for extension %u",
3835 case EventTriggerRelationId:
3844 elog(
ERROR,
"cache lookup failed for event trigger %u",
3854 case ParameterAclRelationId:
3865 elog(
ERROR,
"cache lookup failed for parameter ACL %u",
3870 Anum_pg_parameter_acl_parname);
3877 case PolicyRelationId:
3894 true, NULL, 1, skey);
3901 elog(
ERROR,
"could not find tuple for policy %u",
3923 case PublicationRelationId:
3933 case PublicationNamespaceRelationId:
3939 &pubname, &nspname))
3949 case PublicationRelRelationId:
3961 elog(
ERROR,
"cache lookup failed for publication table %u",
3980 case SubscriptionRelationId:
3990 case TransformRelationId:
4000 elog(
ERROR,
"could not find tuple for transform %u",
4020 if (buffer.
len == 0)
4059 elog(
ERROR,
"cache lookup failed for relation %u", relid);
4072 switch (relForm->relkind)
4074 case RELKIND_RELATION:
4075 case RELKIND_PARTITIONED_TABLE:
4080 case RELKIND_PARTITIONED_INDEX:
4084 case RELKIND_SEQUENCE:
4088 case RELKIND_TOASTVALUE:
4096 case RELKIND_MATVIEW:
4100 case RELKIND_COMPOSITE_TYPE:
4104 case RELKIND_FOREIGN_TABLE:
4134 elog(
ERROR,
"cache lookup failed for opfamily %u", opfid);
4141 elog(
ERROR,
"cache lookup failed for access method %u",
4142 opfForm->opfmethod);
4198 const char *objname = NULL;
4211 elog(
ERROR,
"return type must be a row type");
4233 elog(
ERROR,
"invalid null namespace in object %u/%u/%d",
4251 elog(
ERROR,
"invalid null name in object %u/%u/%d",
4283 if (objname && objidentity)
4328 elog(
ERROR,
"return type must be a row type");
4336 if (identity == NULL)
4380 case RelationRelationId:
4386 case ProcedureRelationId:
4391 case TypeRelationId:
4395 case CastRelationId:
4399 case CollationRelationId:
4403 case ConstraintRelationId:
4408 case ConversionRelationId:
4412 case AttrDefaultRelationId:
4416 case LanguageRelationId:
4420 case LargeObjectRelationId:
4424 case OperatorRelationId:
4428 case OperatorClassRelationId:
4432 case OperatorFamilyRelationId:
4436 case AccessMethodRelationId:
4440 case AccessMethodOperatorRelationId:
4444 case AccessMethodProcedureRelationId:
4448 case RewriteRelationId:
4452 case TriggerRelationId:
4456 case NamespaceRelationId:
4460 case StatisticExtRelationId:
4464 case TSParserRelationId:
4468 case TSDictionaryRelationId:
4472 case TSTemplateRelationId:
4476 case TSConfigRelationId:
4480 case AuthIdRelationId:
4484 case AuthMemRelationId:
4488 case DatabaseRelationId:
4492 case TableSpaceRelationId:
4496 case ForeignDataWrapperRelationId:
4500 case ForeignServerRelationId:
4504 case UserMappingRelationId:
4508 case DefaultAclRelationId:
4512 case ExtensionRelationId:
4516 case EventTriggerRelationId:
4520 case ParameterAclRelationId:
4524 case PolicyRelationId:
4528 case PublicationRelationId:
4532 case PublicationNamespaceRelationId:
4536 case PublicationRelRelationId:
4540 case SubscriptionRelationId:
4544 case TransformRelationId:
4573 elog(
ERROR,
"cache lookup failed for relation %u", relid);
4581 switch (relForm->relkind)
4583 case RELKIND_RELATION:
4584 case RELKIND_PARTITIONED_TABLE:
4588 case RELKIND_PARTITIONED_INDEX:
4591 case RELKIND_SEQUENCE:
4594 case RELKIND_TOASTVALUE:
4600 case RELKIND_MATVIEW:
4603 case RELKIND_COMPOSITE_TYPE:
4606 case RELKIND_FOREIGN_TABLE:
4615 if (objectSubId != 0)
4637 elog(
ERROR,
"cache lookup failed for constraint %u", constroid);
4653 elog(
ERROR,
"invalid constraint %u", constrForm->oid);
4673 elog(
ERROR,
"cache lookup failed for procedure %u", procid);
4681 if (procForm->prokind == PROKIND_AGGREGATE)
4683 else if (procForm->prokind == PROKIND_PROCEDURE)
4737 case RelationRelationId:
4751 if (missing_ok && attr == NULL)
4757 if (objname && *objname ==
NIL)
4765 *objname =
lappend(*objname, attr);
4770 case ProcedureRelationId:
4786 case TypeRelationId:
4793 if (typeout == NULL)
4802 case CastRelationId:
4816 elog(
ERROR,
"could not find tuple for cast %u",
4839 case CollationRelationId:
4850 elog(
ERROR,
"cache lookup failed for collation %u",
4866 case ConstraintRelationId:
4876 elog(
ERROR,
"cache lookup failed for constraint %u",
4896 domain.
classId = TypeRelationId;
4913 case ConversionRelationId:
4924 elog(
ERROR,
"cache lookup failed for conversion %u",
4940 case AttrDefaultRelationId:
4949 elog(
ERROR,
"could not find tuple for attrdef %u",
4961 case LanguageRelationId:
4971 elog(
ERROR,
"cache lookup failed for language %u",
4984 case LargeObjectRelationId:
4993 case OperatorRelationId:
4999 if (oprname == NULL)
5008 case OperatorClassRelationId:
5021 elog(
ERROR,
"cache lookup failed for opclass %u",
5031 elog(
ERROR,
"cache lookup failed for access method %u",
5032 opcForm->opcmethod);
5049 case OperatorFamilyRelationId:
5054 case AccessMethodRelationId:
5062 elog(
ERROR,
"cache lookup failed for access method %u",
5072 case AccessMethodOperatorRelationId:
5083 amopDesc =
table_open(AccessMethodOperatorRelationId,
5099 elog(
ERROR,
"could not find tuple for amop entry %u",
5119 psprintf(
"%d", amopForm->amopstrategy));
5124 amopForm->amopstrategy,
5125 ltype, rtype, opfam.
data);
5134 case AccessMethodProcedureRelationId:
5145 amprocDesc =
table_open(AccessMethodProcedureRelationId,
5161 elog(
ERROR,
"could not find tuple for amproc entry %u",
5181 psprintf(
"%d", amprocForm->amprocnum));
5186 amprocForm->amprocnum,
5187 ltype, rtype, opfam.
data);
5196 case RewriteRelationId:
5210 elog(
ERROR,
"could not find tuple for rule %u",
5229 case TriggerRelationId:
5243 elog(
ERROR,
"could not find tuple for trigger %u",
5262 case NamespaceRelationId:
5270 elog(
ERROR,
"cache lookup failed for namespace %u",
5281 case StatisticExtRelationId:
5292 elog(
ERROR,
"cache lookup failed for statistics object %u",
5300 NameStr(formStatistic->stxname)));
5308 case TSParserRelationId:
5319 elog(
ERROR,
"cache lookup failed for text search parser %u",
5327 NameStr(formParser->prsname)));
5335 case TSDictionaryRelationId:
5346 elog(
ERROR,
"cache lookup failed for text search dictionary %u",
5354 NameStr(formDict->dictname)));
5362 case TSTemplateRelationId:
5373 elog(
ERROR,
"cache lookup failed for text search template %u",
5381 NameStr(formTmpl->tmplname)));
5389 case TSConfigRelationId:
5400 elog(
ERROR,
"cache lookup failed for text search configuration %u",
5416 case AuthIdRelationId:
5430 case AuthMemRelationId:
5442 Anum_pg_auth_members_oid,
5454 elog(
ERROR,
"could not find tuple for pg_auth_members entry %u",
5473 case DatabaseRelationId:
5481 elog(
ERROR,
"cache lookup failed for database %u",
5492 case TableSpaceRelationId:
5500 elog(
ERROR,
"cache lookup failed for tablespace %u",
5511 case ForeignDataWrapperRelationId:
5526 case ForeignServerRelationId:
5542 case UserMappingRelationId:
5548 const char *usename;
5555 elog(
ERROR,
"cache lookup failed for user mapping %u",
5560 useid = umform->umuser;
5582 case DefaultAclRelationId:
5595 Anum_pg_default_acl_oid,
5600 true, NULL, 1, skey);
5607 elog(
ERROR,
"could not find tuple for default ACL %u",
5632 switch (defacl->defaclobjtype)
5634 case DEFACLOBJ_RELATION:
5638 case DEFACLOBJ_SEQUENCE:
5642 case DEFACLOBJ_FUNCTION:
5646 case DEFACLOBJ_TYPE:
5650 case DEFACLOBJ_NAMESPACE:
5660 *objname =
lappend(*objname, schema);
5669 case ExtensionRelationId:
5677 elog(
ERROR,
"cache lookup failed for extension %u",
5687 case EventTriggerRelationId:
5698 elog(
ERROR,
"cache lookup failed for event trigger %u",
5711 case ParameterAclRelationId:
5722 elog(
ERROR,
"cache lookup failed for parameter ACL %u",
5727 Anum_pg_parameter_acl_parname);
5736 case PolicyRelationId:
5750 elog(
ERROR,
"could not find tuple for policy %u",
5769 case PublicationRelationId:
5784 case PublicationNamespaceRelationId:
5808 case PublicationRelRelationId:
5819 elog(
ERROR,
"cache lookup failed for publication table %u",
5837 case SubscriptionRelationId:
5852 case TransformRelationId:
5857 char *transformLang;
5858 char *transformType;
5863 Anum_pg_transform_oid,
5869 elog(
ERROR,
"could not find tuple for transform %u",
5905 if (objname && *objname ==
NIL)
5906 elog(
ERROR,
"requested object address for unsupported object class %u: text result \"%s\"",
5912 if (buffer.
len == 0)
5914 Assert((objname == NULL || *objname ==
NIL) &&
5915 (objargs == NULL || *objargs ==
NIL));
5937 elog(
ERROR,
"cache lookup failed for opfamily %u", opfid);
5944 elog(
ERROR,
"cache lookup failed for access method %u",
5945 opfForm->opfmethod);
5980 elog(
ERROR,
"cache lookup failed for relation %u", relid);
6039 lb, TEXTOID, -1,
false, TYPALIGN_INT);
6061 case RELKIND_RELATION:
6062 case RELKIND_PARTITIONED_TABLE:
6065 case RELKIND_PARTITIONED_INDEX:
6067 case RELKIND_SEQUENCE:
6071 case RELKIND_MATVIEW:
6073 case RELKIND_FOREIGN_TABLE:
6075 case RELKIND_TOASTVALUE:
bool is_admin_of_role(Oid member, Oid role)
Oid get_role_oid(const char *rolname, bool missing_ok)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
void aclcheck_error_type(AclResult aclerr, Oid typeOid)
bool has_createrole_privilege(Oid roleid)
Oid get_index_am_oid(const char *amname, bool missing_ok)
char * get_am_name(Oid amOid)
Oid get_am_oid(const char *amname, bool missing_ok)
#define PG_GETARG_ARRAYTYPE_P(n)
ArrayType * construct_empty_array(Oid elmtype)
void deconstruct_array_builtin(ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
#define InvalidAttrNumber
char * get_tablespace_name(Oid spc_oid)
Oid get_tablespace_oid(const char *tablespacename, bool missing_ok)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define TextDatumGetCString(d)
#define FORMAT_TYPE_INVALID_AS_NULL
#define FORMAT_TYPE_FORCE_QUALIFY
#define Assert(condition)
#define PointerIsValid(pointer)
#define OidIsValid(objectId)
bool IsSharedRelation(Oid relationId)
char * get_database_name(Oid dbid)
Oid get_database_oid(const char *dbname, bool missing_ok)
int errmsg_internal(const char *fmt,...)
int errdetail(const char *fmt,...)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
Oid get_event_trigger_oid(const char *trigname, bool missing_ok)
Oid get_extension_oid(const char *extname, bool missing_ok)
char * get_extension_name(Oid ext_oid)
#define PG_GETARG_DATUM(n)
#define PG_RETURN_TEXT_P(x)
#define PG_GETARG_INT32(n)
#define PG_RETURN_DATUM(x)
ForeignServer * GetForeignServerExtended(Oid serverid, bits16 flags)
Oid get_foreign_server_oid(const char *servername, bool missing_ok)
ForeignDataWrapper * GetForeignDataWrapperExtended(Oid fdwid, bits16 flags)
ForeignServer * GetForeignServer(Oid serverid)
ForeignServer * GetForeignServerByName(const char *srvname, bool missing_ok)
Oid get_foreign_data_wrapper_oid(const char *fdwname, bool missing_ok)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
Oid get_transform_oid(Oid type_id, Oid lang_id, bool missing_ok)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
HeapTuple heap_copytuple(HeapTuple tuple)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
bool lo_compat_privileges
List * lappend(List *list, void *datum)
List * list_copy_head(const List *oldlist, int len)
List * list_copy_tail(const List *oldlist, int nskip)
List * lcons(void *datum, List *list)
void LockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void UnlockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void UnlockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
char * get_language_name(Oid langoid, bool missing_ok)
Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok)
AttrNumber get_attnum(Oid relid, const char *attname)
char * get_namespace_name_or_temp(Oid nspid)
char * get_namespace_name(Oid nspid)
char get_rel_relkind(Oid relid)
Oid get_publication_oid(const char *pubname, bool missing_ok)
char * get_publication_name(Oid pubid, bool missing_ok)
Oid get_subscription_oid(const char *subname, bool missing_ok)
char * get_subscription_name(Oid subid, bool missing_ok)
char * get_attname(Oid relid, AttrNumber attnum, bool missing_ok)
char * pstrdup(const char *in)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
char * GetUserNameFromId(Oid roleid, bool noerr)
bool TSTemplateIsVisible(Oid tmplId)
bool OpfamilyIsVisible(Oid opfid)
bool CollationIsVisible(Oid collid)
bool ConversionIsVisible(Oid conid)
Oid get_statistics_object_oid(List *names, bool missing_ok)
Oid get_collation_oid(List *collname, bool missing_ok)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
bool RelationIsVisible(Oid relid)
bool OpclassIsVisible(Oid opcid)
RangeVar * makeRangeVarFromNameList(const List *names)
bool TSParserIsVisible(Oid prsId)
Oid get_conversion_oid(List *conname, bool missing_ok)
Oid get_ts_dict_oid(List *names, bool missing_ok)
Oid get_ts_parser_oid(List *names, bool missing_ok)
char * NameListToString(const List *names)
Oid get_ts_config_oid(List *names, bool missing_ok)
bool TSConfigIsVisible(Oid cfgid)
bool StatisticsObjIsVisible(Oid stxid)
bool TSDictionaryIsVisible(Oid dictId)
Oid get_ts_template_oid(List *names, bool missing_ok)
#define castNode(_type_, nodeptr)
static void getRelationDescription(StringInfo buffer, Oid relid, bool missing_ok)
int get_object_catcache_name(Oid class_id)
bool get_object_namensp_unique(Oid class_id)
ObjectAddress get_object_address_rv(ObjectType objtype, RangeVar *rel, List *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
AttrNumber get_object_attnum_owner(Oid class_id)
ArrayType * strlist_to_textarray(List *list)
Datum pg_identify_object(PG_FUNCTION_ARGS)
HeapTuple get_catalog_object_by_oid(Relation catalog, AttrNumber oidcol, Oid objectId)
AttrNumber get_object_attnum_oid(Oid class_id)
char * getObjectDescriptionOids(Oid classid, Oid objid)
static const ObjectPropertyType ObjectProperty[]
ObjectType get_relkind_objtype(char relkind)
AttrNumber get_object_attnum_namespace(Oid class_id)
char * getObjectDescription(const ObjectAddress *object, bool missing_ok)
void check_object_ownership(Oid roleid, ObjectType objtype, ObjectAddress address, Node *object, Relation relation)
static ObjectAddress get_object_address_publication_schema(List *object, bool missing_ok)
AttrNumber get_object_attnum_name(Oid class_id)
static ObjectAddress get_object_address_relobject(ObjectType objtype, List *object, Relation *relp, bool missing_ok)
static void getConstraintTypeDescription(StringInfo buffer, Oid constroid, bool missing_ok)
static void getProcedureTypeDescription(StringInfo buffer, Oid procid, bool missing_ok)
static void getOpFamilyIdentity(StringInfo buffer, Oid opfid, List **object, bool missing_ok)
static ObjectAddress get_object_address_defacl(List *object, bool missing_ok)
static bool getPublicationSchemaInfo(const ObjectAddress *object, bool missing_ok, char **pubname, char **nspname)
AttrNumber get_object_attnum_acl(Oid class_id)
char * getObjectIdentity(const ObjectAddress *object, bool missing_ok)
char * getObjectTypeDescription(const ObjectAddress *object, bool missing_ok)
static void getRelationTypeDescription(StringInfo buffer, Oid relid, int32 objectSubId, bool missing_ok)
int get_object_catcache_oid(Oid class_id)
static void getOpFamilyDescription(StringInfo buffer, Oid opfid, bool missing_ok)
Oid get_object_oid_index(Oid class_id)
static ObjectAddress get_object_address_unqualified(ObjectType objtype, String *strval, bool missing_ok)
char * getObjectIdentityParts(const ObjectAddress *object, List **objname, List **objargs, bool missing_ok)
int read_objtype_from_string(const char *objtype)
const ObjectAddress InvalidObjectAddress
ObjectType get_object_type(Oid class_id, Oid object_id)
static ObjectAddress get_object_address_publication_rel(List *object, Relation *relp, bool missing_ok)
static ObjectAddress get_object_address_opf_member(ObjectType objtype, List *object, bool missing_ok)
static const ObjectPropertyType * get_object_property_data(Oid class_id)
static ObjectAddress get_object_address_type(ObjectType objtype, TypeName *typename, bool missing_ok)
static ObjectAddress get_object_address_usermapping(List *object, bool missing_ok)
static const struct object_type_map ObjectTypeMap[]
static void getRelationIdentity(StringInfo buffer, Oid relid, List **object, bool missing_ok)
static ObjectAddress get_object_address_opcf(ObjectType objtype, List *object, bool missing_ok)
Datum pg_identify_object_as_address(PG_FUNCTION_ARGS)
ObjectAddress get_object_address(ObjectType objtype, Node *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
Datum pg_describe_object(PG_FUNCTION_ARGS)
Datum pg_get_object_address(PG_FUNCTION_ARGS)
static ObjectAddress get_object_address_attribute(ObjectType objtype, List *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
static ObjectAddress get_relation_by_qualified_name(ObjectType objtype, List *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
const char * get_object_class_descr(Oid class_id)
static List * textarray_to_strvaluelist(ArrayType *arr)
Oid get_object_namespace(const ObjectAddress *address)
static ObjectAddress get_object_address_attrdef(ObjectType objtype, List *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
bool is_objectclass_supported(Oid class_id)
#define ObjectAddressSet(addr, class_id, object_id)
Oid get_opclass_oid(Oid amID, List *opclassname, bool missing_ok)
Oid get_opfamily_oid(Oid amID, List *opfamilyname, bool missing_ok)
Oid LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func, bool missing_ok)
Oid LookupOperWithArgs(ObjectWithArgs *oper, bool noError)
Type LookupTypeName(ParseState *pstate, const TypeName *typeName, int32 *typmod_p, bool missing_ok)
char * TypeNameToString(const TypeName *typeName)
TypeName * typeStringToTypeName(const char *str, Node *escontext)
Oid typenameTypeId(ParseState *pstate, const TypeName *typeName)
Oid LookupTypeNameOid(ParseState *pstate, const TypeName *typeName, bool missing_ok)
@ OBJECT_PUBLICATION_NAMESPACE
FormData_pg_am * Form_pg_am
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
Oid GetAttrDefaultOid(Oid relid, AttrNumber attnum)
ObjectAddress GetAttrDefaultColumnAddress(Oid attrdefoid)
FormData_pg_auth_members * Form_pg_auth_members
FormData_pg_authid * Form_pg_authid
FormData_pg_cast * Form_pg_cast
FormData_pg_class * Form_pg_class
FormData_pg_collation * Form_pg_collation
Oid get_relation_constraint_oid(Oid relid, const char *conname, bool missing_ok)
Oid get_domain_constraint_oid(Oid typid, const char *conname, bool missing_ok)
FormData_pg_constraint * Form_pg_constraint
FormData_pg_conversion * Form_pg_conversion
FormData_pg_default_acl * Form_pg_default_acl
FormData_pg_event_trigger * Form_pg_event_trigger
FormData_pg_language * Form_pg_language
bool LargeObjectExists(Oid loid)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
#define lsecond_node(type, l)
#define list_make3(x1, x2, x3)
#define list_make2(x1, x2)
FormData_pg_opclass * Form_pg_opclass
FormData_pg_opfamily * Form_pg_opfamily
Oid ParameterAclLookup(const char *parameter, bool missing_ok)
FormData_pg_policy * Form_pg_policy
FormData_pg_proc * Form_pg_proc
Publication * GetPublicationByName(const char *pubname, bool missing_ok)
FormData_pg_publication_namespace * Form_pg_publication_namespace
FormData_pg_publication_rel * Form_pg_publication_rel
FormData_pg_rewrite * Form_pg_rewrite
FormData_pg_statistic_ext * Form_pg_statistic_ext
FormData_pg_trigger * Form_pg_trigger
FormData_pg_ts_config * Form_pg_ts_config
FormData_pg_ts_dict * Form_pg_ts_dict
FormData_pg_ts_parser * Form_pg_ts_parser
FormData_pg_ts_template * Form_pg_ts_template
FormData_pg_type * Form_pg_type
FormData_pg_user_mapping * Form_pg_user_mapping
Oid get_relation_policy_oid(Oid relid, const char *policy_name, bool missing_ok)
static Datum PointerGetDatum(const void *X)
static Name DatumGetName(Datum X)
static Oid DatumGetObjectId(Datum X)
static Datum Int16GetDatum(int16 X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static Datum CharGetDatum(char X)
Oid get_language_oid(const char *langname, bool missing_ok)
char * psprintf(const char *fmt,...)
MemoryContextSwitchTo(old_ctx)
char * format_operator(Oid operator_oid)
char * format_procedure(Oid procedure_oid)
char * format_operator_extended(Oid operator_oid, bits16 flags)
char * format_procedure_extended(Oid procedure_oid, bits16 flags)
void format_operator_parts(Oid operator_oid, List **objnames, List **objargs, bool missing_ok)
void format_procedure_parts(Oid procedure_oid, List **objnames, List **objargs, bool missing_ok)
#define FORMAT_OPERATOR_INVALID_AS_NULL
#define FORMAT_OPERATOR_FORCE_QUALIFY
#define FORMAT_PROC_FORCE_QUALIFY
#define FORMAT_PROC_INVALID_AS_NULL
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
Oid get_rewrite_oid(Oid relid, const char *rulename, bool missing_ok)
const char * quote_identifier(const char *ident)
char * quote_qualified_identifier(const char *qualifier, const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
uint64 SharedInvalidMessageCounter
Relation relation_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
#define BTEqualStrategyNumber
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
AttrNumber attnum_namespace
bool superuser_arg(Oid roleid)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
HeapTuple SearchSysCache3(int cacheId, Datum key1, Datum key2, Datum key3)
HeapTuple SearchSysCache2(int cacheId, Datum key1, Datum key2)
HeapTuple SearchSysCache4(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
#define SearchSysCacheCopy1(cacheId, key1)
#define GetSysCacheOid2(cacheId, oidcol, key1, key2)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
Relation table_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)
Oid get_trigger_oid(Oid relid, const char *trigname, bool missing_ok)
Float * makeFloat(char *numericStr)
String * makeString(char *str)
text * cstring_to_text(const char *s)