PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/namespace.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/varlena.h"
Go to the source code of this file.
Functions | |
Datum | namein (PG_FUNCTION_ARGS) |
Datum | nameout (PG_FUNCTION_ARGS) |
Datum | namerecv (PG_FUNCTION_ARGS) |
Datum | namesend (PG_FUNCTION_ARGS) |
static int | namecmp (Name arg1, Name arg2, Oid collid) |
Datum | nameeq (PG_FUNCTION_ARGS) |
Datum | namene (PG_FUNCTION_ARGS) |
Datum | namelt (PG_FUNCTION_ARGS) |
Datum | namele (PG_FUNCTION_ARGS) |
Datum | namegt (PG_FUNCTION_ARGS) |
Datum | namege (PG_FUNCTION_ARGS) |
Datum | btnamecmp (PG_FUNCTION_ARGS) |
Datum | btnamesortsupport (PG_FUNCTION_ARGS) |
int | namecpy (Name n1, const NameData *n2) |
int | namestrcpy (Name name, const char *str) |
int | namestrcmp (Name name, const char *str) |
Datum | current_user (PG_FUNCTION_ARGS) |
Datum | session_user (PG_FUNCTION_ARGS) |
Datum | current_schema (PG_FUNCTION_ARGS) |
Datum | current_schemas (PG_FUNCTION_ARGS) |
Datum | nameconcatoid (PG_FUNCTION_ARGS) |
Datum btnamecmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 202 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_INT32.
Referenced by leftmostvalue_name().
Datum btnamesortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 211 of file name.c.
References MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_collation, SortSupportData::ssup_cxt, and varstr_sortsupport().
Datum current_schema | ( | PG_FUNCTION_ARGS | ) |
Definition at line 319 of file name.c.
References CStringGetDatum, DirectFunctionCall1, fetch_search_path(), get_namespace_name(), linitial_oid, list_free(), namein(), NIL, PG_RETURN_DATUM, and PG_RETURN_NULL.
Referenced by ExecEvalSQLValueFunction().
Datum current_schemas | ( | PG_FUNCTION_ARGS | ) |
Definition at line 334 of file name.c.
References construct_array(), CStringGetDatum, DirectFunctionCall1, fetch_search_path(), get_namespace_name(), i, lfirst_oid, list_free(), list_length(), NAMEDATALEN, namein(), palloc(), PG_GETARG_BOOL, and PG_RETURN_POINTER.
Datum current_user | ( | PG_FUNCTION_ARGS | ) |
Definition at line 303 of file name.c.
References CStringGetDatum, DirectFunctionCall1, GetUserId(), GetUserNameFromId(), namein(), and PG_RETURN_DATUM.
Referenced by ExecEvalSQLValueFunction().
Definition at line 135 of file name.c.
References NAMEDATALEN, NameStr, and varstr_cmp().
Referenced by btnamecmp(), nameeq(), namege(), namegt(), namele(), namelt(), and namene().
Datum nameconcatoid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 377 of file name.c.
References NAMEDATALEN, NameStr, palloc0(), PG_GETARG_NAME, PG_GETARG_OID, pg_mbcliplen(), PG_RETURN_NAME, and snprintf.
Definition at line 233 of file name.c.
References NAMEDATALEN, NameStr, and StrNCpy.
Referenced by ConstructTupleDescriptor(), and pg_get_replication_slots().
Datum nameeq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 148 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum namege | ( | PG_FUNCTION_ARGS | ) |
Definition at line 193 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum namegt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 184 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum namein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 48 of file name.c.
References NAMEDATALEN, NameStr, palloc0(), PG_GETARG_CSTRING, pg_mbcliplen(), and PG_RETURN_NAME.
Referenced by AlterSubscription(), convert_requires_to_datum(), CreateAccessMethod(), createdb(), CreateForeignDataWrapper(), CreateForeignServer(), CreatePolicy(), CreatePublication(), CreateRole(), CreateSubscription(), CreateTableSpace(), CreateTrigger(), current_schema(), current_schemas(), current_user(), get_available_versions_for_extension(), getdatabaseencoding(), InsertExtensionTuple(), pg_available_extensions(), pg_client_encoding(), pg_convert_from(), pg_convert_to(), PG_encoding_to_char(), pg_get_viewdef_worker(), plpgsql_fulfill_promise(), RenameRole(), session_user(), and string_to_datum().
Datum namele | ( | PG_FUNCTION_ARGS | ) |
Definition at line 175 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum namelt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 166 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum namene | ( | PG_FUNCTION_ARGS | ) |
Definition at line 157 of file name.c.
References namecmp(), PG_GET_COLLATION, PG_GETARG_NAME, and PG_RETURN_BOOL.
Datum nameout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 71 of file name.c.
References NameStr, PG_GETARG_NAME, PG_RETURN_CSTRING, and pstrdup().
Referenced by make_greater_string(), and RelationBuildTriggers().
Datum namerecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 82 of file name.c.
References buf, StringInfoData::cursor, ereport, errcode(), errdetail(), errmsg(), ERROR, StringInfoData::len, NAMEDATALEN, palloc0(), pfree(), PG_GETARG_POINTER, PG_RETURN_NAME, pq_getmsgtext(), and generate_unaccent_rules::str.
Datum namesend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 106 of file name.c.
References buf, NameStr, PG_GETARG_NAME, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendtext().
int namestrcmp | ( | Name | name, |
const char * | str | ||
) |
Definition at line 287 of file name.c.
References NAMEDATALEN, and NameStr.
Referenced by attnameAttNum(), CopyGetAttnums(), CreateTrigger(), expanded_record_lookup_field(), GetAttributeByName(), and SPI_fnumber().
int namestrcpy | ( | Name | name, |
const char * | str | ||
) |
Definition at line 250 of file name.c.
References i, name, NAMEDATALEN, NameStr, generate_unaccent_rules::str, and StrNCpy.
Referenced by AddEnumLabel(), AlterObjectRename_internal(), ATExecAddColumn(), CatCacheCopyKeys(), CollationCreate(), ConstructTupleDescriptor(), ConversionCreate(), create_proc_lang(), CreateConstraintEntry(), CreateOpFamily(), CreateStatistics(), current_database(), DefineAttr(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), EnumValuesCreate(), ExecTypeSetColNames(), formrdesc(), index_concurrently_swap(), insert_event_trigger_tuple(), InsertRule(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), ProcedureCreate(), RelationBuildLocalRelation(), RemoveAttributeById(), rename_policy(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameSchema(), RenameTableSpace(), renametrig(), RenameTypeInternal(), TupleDescInitBuiltinEntry(), TupleDescInitEntry(), TypeCreate(), TypeGetTupleDesc(), and TypeShellMake().
Datum session_user | ( | PG_FUNCTION_ARGS | ) |
Definition at line 309 of file name.c.
References CStringGetDatum, DirectFunctionCall1, GetSessionUserId(), GetUserNameFromId(), namein(), and PG_RETURN_DATUM.
Referenced by ExecEvalSQLValueFunction().