|
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_database.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 801 of file regproc.c.
References format_operator_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), ComputeIndexAttrs(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), regoperatorout(), and spgvalidate().
Definition at line 730 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 814 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 807 of file regproc.c.
References format_operator_extended(), and FORMAT_OPERATOR_FORCE_QUALIFY.
| char * format_procedure | ( | Oid | procedure_oid | ) |
Definition at line 305 of file regproc.c.
References format_procedure_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), compile_pltcl_function(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), initialize_peragg(), pg_logical_slot_get_changes_guts(), plpgsql_compile_callback(), ProcedureCreate(), regprocedureout(), and spgvalidate().
Definition at line 332 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 404 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 311 of file regproc.c.
References FORMAT_PROC_FORCE_QUALIFY, and format_procedure_extended().
Definition at line 1993 of file regproc.c.
References InvalidOid, and parseNumericOid().
Referenced by regclassin(), regcollationin(), regconfigin(), regdatabasein(), regdictionaryin(), regnamespacein(), regprocedurein(), regprocin(), regrolein(), and regtypein().
|
static |
Definition at line 2020 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 1968 of file regproc.c.
References DatumGetObjectId(), DirectInputFunctionCallSafe(), InvalidOid, and oidin().
Referenced by parseDashOrOid(), regoperatorin(), and regoperin().
| Datum regclassin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 890 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 951 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 1034 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 1094 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 1329 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 1367 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 regdatabasein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1783 of file regproc.c.
References elog, ereturn, errcode(), errmsg(), ERROR, get_database_oid(), IsBootstrapProcessingMode, linitial, list_length(), NIL, OidIsValid, parseDashOrOid(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and strVal.
Referenced by to_regdatabase().
| Datum regdatabaseout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1843 of file regproc.c.
References get_database_name(), InvalidOid, NAMEDATALEN, palloc(), PG_GETARG_OID, PG_RETURN_CSTRING, pstrdup(), quote_identifier(), and snprintf.
| Datum regdatabaserecv | ( | PG_FUNCTION_ARGS | ) |
| Datum regdatabasesend | ( | PG_FUNCTION_ARGS | ) |
| Datum regdictionaryin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1439 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 1477 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 1666 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 1726 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 647 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 847 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 484 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 552 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 229 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 441 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 67 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 139 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 1549 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 1609 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 1184 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 1255 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 1922 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(), regdatabasein(), regdictionaryin(), regnamespacein(), regoperin(), regprocin(), regrolein(), RelationNameGetTupleDesc(), thesaurus_init(), and tsvector_update_trigger().
| Datum text_regclass | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1899 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 933 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 1076 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regcollationin(), and text_to_cstring().
| Datum to_regdatabase | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1825 of file regproc.c.
References DirectInputFunctionCallSafe(), InvalidOid, PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PG_RETURN_NULL, regdatabasein(), and text_to_cstring().
| Datum to_regnamespace | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1708 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 534 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 702 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 121 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 284 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 1591 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 1217 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 1237 of file regproc.c.
References parseTypeString(), PG_GETARG_TEXT_PP, PG_RETURN_INT32, PG_RETURN_NULL, and text_to_cstring().