140 if (r->
rd_rel->relkind == RELKIND_INDEX ||
141 r->
rd_rel->relkind == RELKIND_PARTITIONED_INDEX ||
142 r->
rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
144 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
145 errmsg(
"cannot open relation \"%s\"",
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int errdetail_relkind_not_supported(char relkind)
#define RelationGetRelationName(relation)
Relation relation_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation try_relation_open(Oid relationId, LOCKMODE lockmode)
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
Relation try_table_open(Oid relationId, LOCKMODE lockmode)
static void validate_relation_kind(Relation r)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode)
Relation table_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)