38 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
39 errmsg(
"\"%s\" cannot be NULL",
40 arginfo[argnum].argname)));
53 int argnum,
int elevel)
65 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
66 errmsg(
"\"%s\" cannot be a multidimensional array",
67 arginfo[argnum].argname)));
74 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
75 errmsg(
"\"%s\" array cannot contain NULL values",
76 arginfo[argnum].argname)));
94 int argnum1,
int argnum2,
int elevel)
101 int nullarg =
PG_ARGISNULL(argnum1) ? argnum1 : argnum2;
102 int otherarg =
PG_ARGISNULL(argnum1) ? argnum2 : argnum1;
105 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
106 errmsg(
"\"%s\" must be specified when \"%s\" is specified",
107 arginfo[nullarg].argname,
108 arginfo[otherarg].argname)));
129 const char relkind = rel->
rd_rel->relkind;
134 case RELKIND_RELATION:
136 case RELKIND_MATVIEW:
137 case RELKIND_FOREIGN_TABLE:
138 case RELKIND_PARTITIONED_TABLE:
139 case RELKIND_PARTITIONED_INDEX:
143 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
144 errmsg(
"cannot modify statistics for relation \"%s\"",
149 if (rel->
rd_rel->relisshared)
151 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
152 errmsg(
"cannot modify statistics for shared relation")));
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
AclResult pg_class_aclcheck(Oid table_oid, Oid roleid, AclMode mode)
#define DatumGetArrayTypeP(X)
bool array_contains_nulls(ArrayType *array)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_DATUM(n)
#define ShareUpdateExclusiveLock
ObjectType get_relkind_objtype(char relkind)
int errdetail_relkind_not_supported(char relkind)
#define RelationGetRelid(relation)
#define RelationGetRelationName(relation)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
bool stats_check_arg_array(FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum, int elevel)
void stats_check_required_arg(FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum)
bool stats_check_arg_pair(FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum1, int argnum2, int elevel)
void stats_lock_check_privileges(Oid reloid)