45 if (r->
rd_rel->relkind == RELKIND_INDEX ||
46 r->
rd_rel->relkind == RELKIND_PARTITIONED_INDEX)
48 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
49 errmsg(
"\"%s\" is an index",
51 else if (r->
rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
53 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
54 errmsg(
"\"%s\" is a composite type",
79 if (r->
rd_rel->relkind == RELKIND_INDEX ||
80 r->
rd_rel->relkind == RELKIND_PARTITIONED_INDEX)
82 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
83 errmsg(
"\"%s\" is an index",
85 else if (r->
rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
87 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
88 errmsg(
"\"%s\" is a composite type",
108 if (r->
rd_rel->relkind == RELKIND_INDEX ||
109 r->
rd_rel->relkind == RELKIND_PARTITIONED_INDEX)
111 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
112 errmsg(
"\"%s\" is an index",
114 else if (r->
rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
116 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
117 errmsg(
"\"%s\" is a composite type",
141 if (r->
rd_rel->relkind == RELKIND_INDEX ||
142 r->
rd_rel->relkind == RELKIND_PARTITIONED_INDEX)
144 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
145 errmsg(
"\"%s\" is an index",
147 else if (r->
rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
149 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
150 errmsg(
"\"%s\" is a composite type",
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)
int errcode(int sqlerrcode)
Relation try_table_open(Oid relationId, LOCKMODE lockmode)
Relation try_relation_open(Oid relationId, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
#define RelationGetRelationName(relation)
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode)
#define ereport(elevel,...)
void relation_close(Relation relation, LOCKMODE lockmode)
int errmsg(const char *fmt,...)
Relation table_open(Oid relationId, LOCKMODE lockmode)
Relation relation_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)