50 List **names,
int *nargs,
Oid *argtypes,
70 Node *escontext = fcinfo->context;
87 elog(
ERROR,
"regproc values must be OIDs in bootstrap mode");
107 errmsg(
"more than one function named \"%s\"",
176 -1,
NIL,
false,
false,
false,
false,
232 Node *escontext = fcinfo->context;
246 elog(
ERROR,
"regprocedure values must be OIDs in bootstrap mode");
255 &names, &nargs, argtypes,
365 for (
i = 0;
i < nargs;
i++)
427 for (
i = 0;
i < nargs;
i++)
487 Node *escontext = fcinfo->context;
501 elog(
ERROR,
"regoper values must be OIDs in bootstrap mode");
520 errmsg(
"more than one operator named %s",
599 sprintf(result,
"%s.%s", nspname, oprname);
650 Node *escontext = fcinfo->context;
662 elog(
ERROR,
"regoperator values must be OIDs in bootstrap mode");
671 &names, &nargs, argtypes,
678 errmsg(
"missing argument"),
679 errhint(
"Use NONE to denote the missing argument of a unary operator.")));
683 errmsg(
"too many arguments"),
684 errhint(
"Provide two argument types for operator.")));
824 elog(
ERROR,
"cache lookup failed for operator with OID %u",
893 Node *escontext = fcinfo->context;
905 elog(
ERROR,
"regclass values must be OIDs in bootstrap mode");
921 errmsg(
"relation \"%s\" does not exist",
1037 Node *escontext = fcinfo->context;
1049 elog(
ERROR,
"regcollation values must be OIDs in bootstrap mode");
1064 errmsg(
"collation \"%s\" for encoding \"%s\" does not exist",
1084 (
Node *) &escontext,
1187 Node *escontext = fcinfo->context;
1199 elog(
ERROR,
"regtype values must be OIDs in bootstrap mode");
1225 (
Node *) &escontext,
1332 Node *escontext = fcinfo->context;
1342 elog(
ERROR,
"regconfig values must be OIDs in bootstrap mode");
1357 errmsg(
"text search configuration \"%s\" does not exist",
1442 Node *escontext = fcinfo->context;
1452 elog(
ERROR,
"regdictionary values must be OIDs in bootstrap mode");
1467 errmsg(
"text search dictionary \"%s\" does not exist",
1552 Node *escontext = fcinfo->context;
1562 elog(
ERROR,
"regrole values must be OIDs in bootstrap mode");
1572 errmsg(
"invalid name syntax")));
1579 errmsg(
"role \"%s\" does not exist",
1599 (
Node *) &escontext,
1669 Node *escontext = fcinfo->context;
1679 elog(
ERROR,
"regnamespace values must be OIDs in bootstrap mode");
1689 errmsg(
"invalid name syntax")));
1696 errmsg(
"schema \"%s\" does not exist",
1716 (
Node *) &escontext,
1786 Node *escontext = fcinfo->context;
1796 elog(
ERROR,
"regdatabase values must be OIDs in bootstrap mode");
1806 errmsg(
"invalid name syntax")));
1813 errmsg(
"database \"%s\" does not exist",
1833 (
Node *) &escontext,
1935 errmsg(
"invalid name syntax")));
1940 errmsg(
"invalid name syntax")));
1970 if (
string[0] >=
'0' &&
string[0] <=
'9' &&
1996 if (
strcmp(
string,
"-") == 0)
2021 int *nargs,
Oid *argtypes,
2039 for (ptr =
rawname; *ptr; ptr++)
2049 errmsg(
"expected a left parenthesis")));
2059 while (--
ptr2 > ptr)
2067 errmsg(
"expected a right parenthesis")));
2086 errmsg(
"expected a type name")));
2118 errmsg(
"improper type name")));
2132 while (--
ptr2 >=
typename)
2154 errmsg(
"too many arguments")));
2156 argtypes[*nargs] =
typeid;
Oid get_role_oid(const char *rolname, bool missing_ok)
#define Assert(condition)
#define OidIsValid(objectId)
Oid get_database_oid(const char *dbname, bool missing_ok)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
bool DirectInputFunctionCallSafe(PGFunction func, char *str, Oid typioparam, int32 typmod, Node *escontext, Datum *result)
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_INT32(x)
#define PG_RETURN_DATUM(x)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * lappend(List *list, void *datum)
void list_free(List *list)
char * get_database_name(Oid dbid)
char * get_namespace_name_or_temp(Oid nspid)
char * get_namespace_name(Oid nspid)
const char * GetDatabaseEncodingName(void)
char * pstrdup(const char *in)
void pfree(void *pointer)
#define IsBootstrapProcessingMode()
char * GetUserNameFromId(Oid roleid, bool noerr)
Oid OpernameGetOprid(List *names, Oid oprleft, Oid oprright)
char * NameListToString(const List *names)
bool CollationIsVisible(Oid collid)
Oid get_collation_oid(List *collname, bool missing_ok)
FuncCandidateList OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok, int *fgc_flags)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
bool RelationIsVisible(Oid relid)
bool OperatorIsVisible(Oid oprid)
FuncCandidateList FuncnameGetCandidates(List *names, int nargs, List *argnames, bool expand_variadic, bool expand_defaults, bool include_out_arguments, bool missing_ok, int *fgc_flags)
bool FunctionIsVisible(Oid funcid)
Oid get_ts_dict_oid(List *names, bool missing_ok)
RangeVar * makeRangeVarFromNameList(const List *names)
Oid get_ts_config_oid(List *names, bool missing_ok)
bool TSConfigIsVisible(Oid cfgid)
bool TSDictionaryIsVisible(Oid dictId)
#define RangeVarGetRelid(relation, lockmode, missing_ok)
Datum oidrecv(PG_FUNCTION_ARGS)
Datum oidin(PG_FUNCTION_ARGS)
Datum oidsend(PG_FUNCTION_ARGS)
bool parseTypeString(const char *str, Oid *typeid_p, int32 *typmod_p, Node *escontext)
FormData_pg_class * Form_pg_class
FormData_pg_collation * Form_pg_collation
static int list_length(const List *l)
#define list_make2(x1, x2)
FormData_pg_operator * Form_pg_operator
FormData_pg_proc * Form_pg_proc
static char buf[DEFAULT_XLOG_SEG_SIZE]
FormData_pg_ts_config * Form_pg_ts_config
FormData_pg_ts_dict * Form_pg_ts_dict
FormData_pg_type * Form_pg_type
#define ERRCODE_UNDEFINED_TABLE
int pg_strcasecmp(const char *s1, const char *s2)
static Oid DatumGetObjectId(Datum X)
static Datum ObjectIdGetDatum(Oid X)
static bool parseNameAndArgTypes(const char *string, bool allowNone, List **names, int *nargs, Oid *argtypes, Node *escontext)
Datum regtypesend(PG_FUNCTION_ARGS)
Datum regoperout(PG_FUNCTION_ARGS)
Datum regnamespacein(PG_FUNCTION_ARGS)
Datum regtypein(PG_FUNCTION_ARGS)
Datum regprocrecv(PG_FUNCTION_ARGS)
Datum to_regoperator(PG_FUNCTION_ARGS)
Datum regnamespaceout(PG_FUNCTION_ARGS)
char * format_operator_qualified(Oid operator_oid)
Datum regoperatorsend(PG_FUNCTION_ARGS)
char * format_procedure_extended(Oid procedure_oid, bits16 flags)
Datum regoperin(PG_FUNCTION_ARGS)
Datum regoperatorrecv(PG_FUNCTION_ARGS)
Datum regproceduresend(PG_FUNCTION_ARGS)
Datum regdictionarysend(PG_FUNCTION_ARGS)
Datum regprocout(PG_FUNCTION_ARGS)
Datum to_regoper(PG_FUNCTION_ARGS)
Datum to_regprocedure(PG_FUNCTION_ARGS)
char * format_procedure(Oid procedure_oid)
Datum regcollationrecv(PG_FUNCTION_ARGS)
Datum regcollationin(PG_FUNCTION_ARGS)
Datum regprocedureout(PG_FUNCTION_ARGS)
Datum regtyperecv(PG_FUNCTION_ARGS)
Datum regdatabasesend(PG_FUNCTION_ARGS)
Datum regdictionaryrecv(PG_FUNCTION_ARGS)
Datum regrolerecv(PG_FUNCTION_ARGS)
Datum regclassrecv(PG_FUNCTION_ARGS)
static bool parseDashOrOid(char *string, Oid *result, Node *escontext)
Datum to_regrole(PG_FUNCTION_ARGS)
Datum regconfigrecv(PG_FUNCTION_ARGS)
Datum regdictionaryout(PG_FUNCTION_ARGS)
Datum regdictionaryin(PG_FUNCTION_ARGS)
Datum regdatabaserecv(PG_FUNCTION_ARGS)
Datum regoperatorout(PG_FUNCTION_ARGS)
Datum regcollationout(PG_FUNCTION_ARGS)
Datum regprocsend(PG_FUNCTION_ARGS)
Datum regoperatorin(PG_FUNCTION_ARGS)
Datum regconfigsend(PG_FUNCTION_ARGS)
Datum regclassin(PG_FUNCTION_ARGS)
Datum regconfigin(PG_FUNCTION_ARGS)
char * format_operator_extended(Oid operator_oid, bits16 flags)
List * stringToQualifiedNameList(const char *string, Node *escontext)
void format_operator_parts(Oid operator_oid, List **objnames, List **objargs, bool missing_ok)
Datum to_regcollation(PG_FUNCTION_ARGS)
Datum regconfigout(PG_FUNCTION_ARGS)
Datum to_regtype(PG_FUNCTION_ARGS)
Datum regroleout(PG_FUNCTION_ARGS)
Datum to_regclass(PG_FUNCTION_ARGS)
Datum to_regdatabase(PG_FUNCTION_ARGS)
Datum regopersend(PG_FUNCTION_ARGS)
static bool parseNumericOid(char *string, Oid *result, Node *escontext)
Datum regoperrecv(PG_FUNCTION_ARGS)
Datum regnamespacesend(PG_FUNCTION_ARGS)
Datum regprocedurein(PG_FUNCTION_ARGS)
Datum regrolein(PG_FUNCTION_ARGS)
Datum regcollationsend(PG_FUNCTION_ARGS)
Datum to_regproc(PG_FUNCTION_ARGS)
Datum regdatabaseout(PG_FUNCTION_ARGS)
Datum regprocin(PG_FUNCTION_ARGS)
Datum regrolesend(PG_FUNCTION_ARGS)
char * format_procedure_qualified(Oid procedure_oid)
Datum to_regnamespace(PG_FUNCTION_ARGS)
void format_procedure_parts(Oid procedure_oid, List **objnames, List **objargs, bool missing_ok)
Datum to_regtypemod(PG_FUNCTION_ARGS)
Datum regdatabasein(PG_FUNCTION_ARGS)
Datum regclasssend(PG_FUNCTION_ARGS)
Datum regtypeout(PG_FUNCTION_ARGS)
char * format_operator(Oid operator_oid)
Datum text_regclass(PG_FUNCTION_ARGS)
Datum regprocedurerecv(PG_FUNCTION_ARGS)
Datum regnamespacerecv(PG_FUNCTION_ARGS)
Datum regclassout(PG_FUNCTION_ARGS)
#define FORMAT_OPERATOR_INVALID_AS_NULL
#define FORMAT_OPERATOR_FORCE_QUALIFY
#define FORMAT_PROC_FORCE_QUALIFY
#define FORMAT_PROC_INVALID_AS_NULL
char * quote_qualified_identifier(const char *qualifier, const char *ident)
const char * quote_identifier(const char *ident)
bool scanner_isspace(char ch)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
String * makeString(char *str)
bool SplitIdentifierString(char *rawstring, char separator, List **namelist)
char * text_to_cstring(const text *t)
List * textToQualifiedNameList(text *textval)