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) |
void | 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.
Datum btnamesortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 211 of file name.c.
References collid, 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 279 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 294 of file name.c.
References construct_array_builtin(), CStringGetDatum(), DirectFunctionCall1, fetch_search_path(), get_namespace_name(), i, lfirst_oid, list_free(), list_length(), namein(), palloc(), PG_GETARG_BOOL, and PG_RETURN_POINTER.
Datum current_user | ( | PG_FUNCTION_ARGS | ) |
Definition at line 263 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 collid, NAMEDATALEN, NameStr, and varstr_cmp().
Referenced by btnamecmp(), nameeq(), namege(), namegt(), namele(), namelt(), and namene().
Datum nameconcatoid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 333 of file name.c.
References NAMEDATALEN, NameStr, palloc0(), PG_GETARG_NAME, PG_GETARG_OID, pg_mbcliplen(), PG_RETURN_NAME, and snprintf.
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 len, 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(), CreateTriggerFiringOn(), 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, ereport, errcode(), errdetail(), errmsg(), ERROR, NAMEDATALEN, palloc0(), pfree(), PG_GETARG_POINTER, PG_RETURN_NAME, pq_getmsgtext(), and 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 247 of file name.c.
References name, NAMEDATALEN, NameStr, and str.
Referenced by AlterEventTrigger(), attnameAttNum(), CopyGetAttnums(), expanded_record_lookup_field(), GetAttributeByName(), InitPostgres(), NextCopyFromRawFields(), and SPI_fnumber().
void namestrcpy | ( | Name | name, |
const char * | str | ||
) |
Definition at line 233 of file name.c.
References name, NAMEDATALEN, NameStr, and str.
Referenced by AddEnumLabel(), AlterObjectRename_internal(), CatCacheCopyKeys(), CollationCreate(), ConstructTupleDescriptor(), ConversionCreate(), CreateConstraintEntry(), CreateInitDecodingContext(), CreateOpFamily(), CreateProceduralLanguage(), CreateStatistics(), current_database(), DefineAttr(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), EnumValuesCreate(), ExecTypeSetColNames(), formrdesc(), getJsonEncodingConst(), index_concurrently_swap(), insert_event_trigger_tuple(), InsertRule(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), pg_stat_get_replication_slot(), ProcedureCreate(), RelationBuildLocalRelation(), RemoveAttributeById(), rename_policy(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameSchema(), RenameTableSpace(), renametrig_internal(), RenameTypeInternal(), ReplicationSlotCreate(), ReplicationSlotName(), StoreIndexTuple(), synchronize_one_slot(), TupleDescInitBuiltinEntry(), TupleDescInitEntry(), TypeCreate(), TypeGetTupleDesc(), TypeShellMake(), and update_local_synced_slot().
Datum session_user | ( | PG_FUNCTION_ARGS | ) |
Definition at line 269 of file name.c.
References CStringGetDatum(), DirectFunctionCall1, GetSessionUserId(), GetUserNameFromId(), namein(), and PG_RETURN_DATUM.
Referenced by ExecEvalSQLValueFunction().