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 "miscadmin.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 852 of file regproc.c.
References format_operator_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), ComputeIndexAttrs(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), regoperatorout(), and spgvalidate().
Definition at line 781 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(), OPEROID, palloc(), quote_identifier(), ReleaseSysCache(), SearchSysCache1(), and snprintf.
Referenced by format_operator(), format_operator_qualified(), getObjectDescription(), and getObjectIdentityParts().
Definition at line 865 of file regproc.c.
References elog, ERROR, format_type_be_qualified(), get_namespace_name_or_temp(), GETSTRUCT, HeapTupleIsValid, lappend(), list_make2, NameStr, NIL, ObjectIdGetDatum, OPEROID, pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
char* format_operator_qualified | ( | Oid | operator_oid | ) |
Definition at line 858 of file regproc.c.
References format_operator_extended(), and FORMAT_OPERATOR_FORCE_QUALIFY.
char* format_procedure | ( | Oid | procedure_oid | ) |
Definition at line 323 of file regproc.c.
References format_procedure_extended().
Referenced by blvalidate(), brinvalidate(), btvalidate(), do_compile(), getObjectDescription(), ginvalidate(), gistvalidate(), hashvalidate(), initialize_peragg(), pg_logical_slot_get_changes_guts(), ProcedureCreate(), regprocedureout(), and spgvalidate().
Definition at line 350 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(), PROCOID, 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 422 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, PROCOID, pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
char* format_procedure_qualified | ( | Oid | procedure_oid | ) |
Definition at line 329 of file regproc.c.
References FORMAT_PROC_FORCE_QUALIFY, and format_procedure_extended().
|
static |
Definition at line 1925 of file regproc.c.
References Assert(), ereport, errcode(), errmsg(), ERROR, FUNC_MAX_ARGS, InvalidOid, parseTypeString(), pfree(), pg_strcasecmp(), pstrdup(), scanner_isspace(), and stringToQualifiedNameList().
Referenced by regoperatorin(), regprocedurein(), to_regoperator(), and to_regprocedure().
Datum regclassin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 941 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ERROR, InvalidOid, IsBootstrapProcessingMode, makeRangeVarFromNameList(), NoLock, oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, RangeVarGetRelid, and stringToQualifiedNameList().
Datum regclassout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1010 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(), RELOID, 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 1093 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ERROR, get_collation_oid(), InvalidOid, IsBootstrapProcessingMode, oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regcollationout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1161 of file regproc.c.
References CollationIsVisible(), COLLOID, 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 1387 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ERROR, get_ts_config_oid(), InvalidOid, IsBootstrapProcessingMode, oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regconfigout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1426 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, TSConfigIsVisible(), and TSCONFIGOID.
Datum regconfigrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regconfigsend | ( | PG_FUNCTION_ARGS | ) |
Datum regdictionaryin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1498 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ERROR, get_ts_dict_oid(), InvalidOid, IsBootstrapProcessingMode, oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regdictionaryout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1537 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, TSDictionaryIsVisible(), and TSDICTOID.
Datum regdictionaryrecv | ( | PG_FUNCTION_ARGS | ) |
Datum regdictionarysend | ( | PG_FUNCTION_ARGS | ) |
Datum regnamespacein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1734 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errmsg(), ERROR, get_namespace_oid(), InvalidOid, IsBootstrapProcessingMode, linitial, list_length(), oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, stringToQualifiedNameList(), and strVal.
Datum regnamespaceout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1802 of file regproc.c.
References get_namespace_name(), InvalidOid, NAMEDATALEN, 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 674 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errhint(), errmsg(), ERROR, FUNC_MAX_ARGS, InvalidOid, IsBootstrapProcessingMode, oidin(), OidIsValid, OpernameGetOprid(), parseNameAndArgTypes(), PG_GETARG_CSTRING, and PG_RETURN_OID.
Datum regoperatorout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 898 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 502 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errmsg(), ERROR, InvalidOid, IsBootstrapProcessingMode, _FuncCandidateList::next, _FuncCandidateList::oid, oidin(), OpernameGetCandidates(), PG_GETARG_CSTRING, PG_RETURN_OID, and stringToQualifiedNameList().
Datum regoperout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 580 of file regproc.c.
References get_namespace_name(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsBootstrapProcessingMode, list_make1, makeString(), NAMEDATALEN, NameStr, _FuncCandidateList::next, ObjectIdGetDatum, _FuncCandidateList::oid, OpernameGetCandidates(), OPEROID, 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 230 of file regproc.c.
References _FuncCandidateList::args, CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errmsg(), ERROR, FUNC_MAX_ARGS, FuncnameGetCandidates(), InvalidOid, IsBootstrapProcessingMode, _FuncCandidateList::next, NIL, _FuncCandidateList::oid, oidin(), parseNameAndArgTypes(), PG_GETARG_CSTRING, and PG_RETURN_OID.
Referenced by convert_function_name().
Datum regprocedureout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 459 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 61 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errmsg(), ERROR, FuncnameGetCandidates(), InvalidOid, IsBootstrapProcessingMode, _FuncCandidateList::next, NIL, _FuncCandidateList::oid, oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, and stringToQualifiedNameList().
Referenced by transformJsonAggConstructor().
Datum regprocout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 142 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, PROCOID, 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 1609 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ereport, errcode(), errmsg(), ERROR, get_role_oid(), InvalidOid, IsBootstrapProcessingMode, linitial, list_length(), oidin(), PG_GETARG_CSTRING, PG_RETURN_OID, stringToQualifiedNameList(), and strVal.
Datum regroleout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1677 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 1251 of file regproc.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, elog, ERROR, InvalidOid, IsBootstrapProcessingMode, oidin(), parseTypeString(), PG_GETARG_CSTRING, and PG_RETURN_OID.
Referenced by convert_type_name(), and plperl_sv_to_literal().
Datum regtypeout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1313 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, TYPEOID, and typname.
Datum regtyperecv | ( | PG_FUNCTION_ARGS | ) |
Datum regtypesend | ( | PG_FUNCTION_ARGS | ) |
List* stringToQualifiedNameList | ( | const char * | string | ) |
Definition at line 1877 of file regproc.c.
References ereport, errcode(), errmsg(), ERROR, lappend(), lfirst, list_free(), makeString(), NIL, pfree(), pstrdup(), and SplitIdentifierString().
Referenced by call_pltcl_start_proc(), check_TSCurrentConfig(), getTSCurrentConfig(), parseNameAndArgTypes(), regclassin(), regcollationin(), regconfigin(), regdictionaryin(), regnamespacein(), regoperin(), regprocin(), regrolein(), RelationNameGetTupleDesc(), thesaurus_init(), to_regclass(), to_regcollation(), to_regnamespace(), to_regoper(), to_regproc(), to_regrole(), and tsvector_update_trigger().
Datum text_regclass | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1858 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 985 of file regproc.c.
References class_name, makeRangeVarFromNameList(), NoLock, OidIsValid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, RangeVarGetRelid, stringToQualifiedNameList(), and text_to_cstring().
Datum to_regcollation | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1136 of file regproc.c.
References get_collation_oid(), OidIsValid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and text_to_cstring().
Datum to_regnamespace | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1777 of file regproc.c.
References ereport, errcode(), errmsg(), ERROR, get_namespace_oid(), linitial, list_length(), OidIsValid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), strVal, and text_to_cstring().
Datum to_regoper | ( | PG_FUNCTION_ARGS | ) |
Definition at line 557 of file regproc.c.
References _FuncCandidateList::next, _FuncCandidateList::oid, OpernameGetCandidates(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and text_to_cstring().
Datum to_regoperator | ( | PG_FUNCTION_ARGS | ) |
Definition at line 734 of file regproc.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, FUNC_MAX_ARGS, OidIsValid, OpernameGetOprid(), parseNameAndArgTypes(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, and text_to_cstring().
Datum to_regproc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 119 of file regproc.c.
References FuncnameGetCandidates(), _FuncCandidateList::next, NIL, _FuncCandidateList::oid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), and text_to_cstring().
Datum to_regprocedure | ( | PG_FUNCTION_ARGS | ) |
Definition at line 290 of file regproc.c.
References _FuncCandidateList::args, FUNC_MAX_ARGS, FuncnameGetCandidates(), _FuncCandidateList::next, NIL, _FuncCandidateList::oid, parseNameAndArgTypes(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, and text_to_cstring().
Datum to_regrole | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1652 of file regproc.c.
References ereport, errcode(), errmsg(), ERROR, get_role_oid(), linitial, list_length(), OidIsValid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, stringToQualifiedNameList(), strVal, and text_to_cstring().
Datum to_regtype | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1292 of file regproc.c.
References OidIsValid, parseTypeString(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_OID, and text_to_cstring().