PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "access/htup_details.h"
#include "catalog/namespace.h"
#include "catalog/pg_class.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_ts_config.h"
#include "catalog/pg_ts_dict.h"
#include "catalog/pg_type.h"
#include "lib/stringinfo.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "nodes/miscnodes.h"
#include "parser/parse_type.h"
#include "parser/scansup.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/regproc.h"
#include "utils/syscache.h"
#include "utils/varlena.h"
Go to the source code of this file.
char* format_operator | ( | Oid | operator_oid | ) |
Definition at line 793 of file regproc.c.
References format_operator_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), ComputeIndexAttrs(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), regoperatorout(), and spgvalidate().
Definition at line 722 of file regproc.c.
References appendStringInfo(), appendStringInfoString(), Assert, buf, FORMAT_OPERATOR_FORCE_QUALIFY, FORMAT_OPERATOR_INVALID_AS_NULL, format_type_be(), format_type_be_qualified(), get_namespace_name(), GETSTRUCT, HeapTupleIsValid, initStringInfo(), IsBootstrapProcessingMode, NAMEDATALEN, NameStr, ObjectIdGetDatum(), OperatorIsVisible(), palloc(), quote_identifier(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Referenced by format_operator(), format_operator_qualified(), getObjectDescription(), and getObjectIdentityParts().
Definition at line 806 of file regproc.c.
References elog, ERROR, format_type_be_qualified(), get_namespace_name_or_temp(), GETSTRUCT, HeapTupleIsValid, lappend(), list_make2, NameStr, NIL, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
char* format_operator_qualified | ( | Oid | operator_oid | ) |
Definition at line 799 of file regproc.c.
References format_operator_extended(), and FORMAT_OPERATOR_FORCE_QUALIFY.
char* format_procedure | ( | Oid | procedure_oid | ) |
Definition at line 299 of file regproc.c.
References format_procedure_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), compile_pltcl_function(), do_compile(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), initialize_peragg(), pg_logical_slot_get_changes_guts(), ProcedureCreate(), regprocedureout(), and spgvalidate().
Definition at line 326 of file regproc.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert, buf, FORMAT_PROC_FORCE_QUALIFY, FORMAT_PROC_INVALID_AS_NULL, format_type_be(), format_type_be_qualified(), FunctionIsVisible(), get_namespace_name(), GETSTRUCT, HeapTupleIsValid, i, initStringInfo(), IsBootstrapProcessingMode, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), proname, quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Referenced by format_procedure(), format_procedure_qualified(), getObjectDescription(), and getObjectIdentityParts().
void format_procedure_parts | ( | Oid | procedure_oid, |
List ** | objnames, | ||
List ** | objargs, | ||
bool | missing_ok | ||
) |
Definition at line 398 of file regproc.c.
References elog, ERROR, format_type_be_qualified(), get_namespace_name_or_temp(), GETSTRUCT, HeapTupleIsValid, i, lappend(), list_make2, NameStr, NIL, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
char* format_procedure_qualified | ( | Oid | procedure_oid | ) |
Definition at line 305 of file regproc.c.
References FORMAT_PROC_FORCE_QUALIFY, and format_procedure_extended().
Definition at line 1868 of file regproc.c.
References InvalidOid, and parseNumericOid().
Referenced by regclassin(), regcollationin(), regconfigin(), regdictionaryin(), regnamespacein(), regprocedurein(), regprocin(), regrolein(), and regtypein().
|
static |
Definition at line 1895 of file regproc.c.
References Assert, ereturn, errcode(), errmsg(), FUNC_MAX_ARGS, InvalidOid, NIL, parseTypeString(), pfree(), pg_strcasecmp(), pstrdup(), scanner_isspace(), and stringToQualifiedNameList().
Referenced by regoperatorin(), and regprocedurein().
Definition at line 1843 of file regproc.c.
References DatumGetObjectId(), DirectInputFunctionCallSafe(), InvalidOid, and oidin().
Referenced by parseDashOrOid(), regoperatorin(), and regoperin().
Datum regclassin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 882 of file regproc.c.
References elog, ereturn, errcode(), ERRCODE_UNDEFINED_TABLE, errmsg(), ERROR, IsBootstrapProcessingMode, makeRangeVarFromNameList(), NameListToString(), NIL, NoLock, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, RangeVarGetRelid, and stringToQualifiedNameList().
Referenced by to_regclass().
Datum regclassout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 943 of file regproc.c.
References get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_qualified_identifier(), RelationIsVisible(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Referenced by table_to_xml_internal().
Datum regclassrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regclasssend | ( | PG_FUNCTION_ARGS | ) |
Datum regcollationin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1026 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_collation_oid(), GetDatabaseEncodingName(), IsBootstrapProcessingMode, NameListToString(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, and stringToQualifiedNameList().
Referenced by to_regcollation().
Datum regcollationout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1086 of file regproc.c.
References CollationIsVisible(), get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Datum regcollationrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regcollationsend | ( | PG_FUNCTION_ARGS | ) |
Datum regconfigin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1321 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_ts_config_oid(), IsBootstrapProcessingMode, NameListToString(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regconfigout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1359 of file regproc.c.
References get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), snprintf, and TSConfigIsVisible().
Datum regconfigrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regconfigsend | ( | PG_FUNCTION_ARGS | ) |
Datum regdictionaryin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1431 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_ts_dict_oid(), IsBootstrapProcessingMode, NameListToString(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regdictionaryout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1469 of file regproc.c.
References get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), snprintf, and TSDictionaryIsVisible().
Datum regdictionaryrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regdictionarysend | ( | PG_FUNCTION_ARGS | ) |
Datum regnamespacein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1658 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_namespace_oid(), IsBootstrapProcessingMode, linitial, list_length(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and strVal.
Referenced by to_regnamespace().
Datum regnamespaceout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1718 of file regproc.c.
References get_namespace_name(), InvalidOid, NAMEDATALEN, nspid, palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_identifier(), and snprintf.
Datum regnamespacerecv | ( | PG_FUNCTION_ARGS | ) |
Datum regnamespacesend | ( | PG_FUNCTION_ARGS | ) |
Datum regoperatorin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 639 of file regproc.c.
References elog, ereturn, errcode(), errhint(), errmsg(), ERROR, FUNC_MAX_ARGS, IsBootstrapProcessingMode, OidIsValid, OpernameGetOprid(), parseNameAndArgTypes(), parseNumericOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, and PG_RETURN_OID.
Referenced by to_regoperator().
Datum regoperatorout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 839 of file regproc.c.
References format_operator(), InvalidOid, oprid(), PG_GETARG_OID, PG_RETURN_CSTRING, and pstrdup().
Datum regoperatorrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regoperatorsend | ( | PG_FUNCTION_ARGS | ) |
Datum regoperin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 478 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, IsBootstrapProcessingMode, _FuncCandidateList::next, NIL, _FuncCandidateList::oid, OpernameGetCandidates(), parseNumericOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, and stringToQualifiedNameList().
Referenced by to_regoper().
Datum regoperout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 545 of file regproc.c.
References get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, list_make1, makeString(), NAMEDATALEN, NameStr, _FuncCandidateList::next, ObjectIdGetDatum(), _FuncCandidateList::oid, OpernameGetCandidates(), oprid(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_identifier(), ReleaseSysCache(), SearchSysCache1(), snprintf, and sprintf.
Datum regoperrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regopersend | ( | PG_FUNCTION_ARGS | ) |
Datum regprocedurein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 224 of file regproc.c.
References _FuncCandidateList::args, elog, ereturn, errcode(), errmsg(), ERROR, FUNC_MAX_ARGS, FuncnameGetCandidates(), IsBootstrapProcessingMode, _FuncCandidateList::next, NIL, _FuncCandidateList::oid, parseDashOrOid(), parseNameAndArgTypes(), PG_GETARG_CSTRING, PG_RETURN_NULL, and PG_RETURN_OID.
Referenced by convert_function_name(), and to_regprocedure().
Datum regprocedureout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 435 of file regproc.c.
References format_procedure(), InvalidOid, PG_GETARG_OID, PG_RETURN_CSTRING, and pstrdup().
Datum regprocedurerecv | ( | PG_FUNCTION_ARGS | ) |
Datum regproceduresend | ( | PG_FUNCTION_ARGS | ) |
Datum regprocin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 66 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, FuncnameGetCandidates(), IsBootstrapProcessingMode, _FuncCandidateList::next, NIL, _FuncCandidateList::oid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, and stringToQualifiedNameList().
Referenced by to_regproc().
Datum regprocout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 136 of file regproc.c.
References FuncnameGetCandidates(), get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, list_make1, makeString(), NAMEDATALEN, NameStr, _FuncCandidateList::next, NIL, ObjectIdGetDatum(), _FuncCandidateList::oid, palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, proname, pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Datum regprocrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regprocsend | ( | PG_FUNCTION_ARGS | ) |
Datum regrolein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1541 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_role_oid(), IsBootstrapProcessingMode, linitial, list_length(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and strVal.
Referenced by to_regrole().
Datum regroleout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1601 of file regproc.c.
References GetUserNameFromId(), InvalidOid, NAMEDATALEN, palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_identifier(), and snprintf.
Datum regrolerecv | ( | PG_FUNCTION_ARGS | ) |
Datum regrolesend | ( | PG_FUNCTION_ARGS | ) |
Datum regtypein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1176 of file regproc.c.
References elog, ERROR, IsBootstrapProcessingMode, parseDashOrOid(), parseTypeString(), PG_GETARG_CSTRING, and PG_RETURN_OID.
Referenced by convert_type_name(), plperl_sv_to_literal(), and to_regtype().
Datum regtypeout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1247 of file regproc.c.
References format_type_be(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, NAMEDATALEN, NameStr, ObjectIdGetDatum(), palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), ReleaseSysCache(), SearchSysCache1(), snprintf, and typname.
Datum regtyperecv | ( | PG_FUNCTION_ARGS | ) |
Datum regtypesend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1797 of file regproc.c.
References ereturn, errcode(), errmsg(), lappend(), lfirst, list_free(), makeString(), NIL, pfree(), pstrdup(), and SplitIdentifierString().
Referenced by call_pltcl_start_proc(), check_default_text_search_config(), getTSCurrentConfig(), parseNameAndArgTypes(), regclassin(), regcollationin(), regconfigin(), regdictionaryin(), regnamespacein(), regoperin(), regprocin(), regrolein(), RelationNameGetTupleDesc(), thesaurus_init(), and tsvector_update_trigger().
Datum text_regclass | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1774 of file regproc.c.
References makeRangeVarFromNameList(), NoLock, PG_GETARG_TEXT_PP, PG_RETURN_OID, RangeVarGetRelid, relname, and textToQualifiedNameList().
Datum to_regclass | ( | PG_FUNCTION_ARGS | ) |
Definition at line 925 of file regproc.c.
References class_name, DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regclassin(), and text_to_cstring().
Datum to_regcollation | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1068 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regcollationin(), and text_to_cstring().
Datum to_regnamespace | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1700 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regnamespacein(), and text_to_cstring().
Datum to_regoper | ( | PG_FUNCTION_ARGS | ) |
Definition at line 527 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regoperin(), and text_to_cstring().
Datum to_regoperator | ( | PG_FUNCTION_ARGS | ) |
Definition at line 694 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regoperatorin(), and text_to_cstring().
Datum to_regproc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 118 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regprocin(), and text_to_cstring().
Datum to_regprocedure | ( | PG_FUNCTION_ARGS | ) |
Definition at line 278 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regprocedurein(), and text_to_cstring().
Datum to_regrole | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1583 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regrolein(), and text_to_cstring().
Datum to_regtype | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1209 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regtypein(), and text_to_cstring().
Datum to_regtypemod | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1229 of file regproc.c.
References parseTypeString(), PG_GETARG_TEXT_PP, PG_RETURN_INT32, PG_RETURN_NULL, and text_to_cstring().