PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_collation.h"
#include "commands/alter.h"
#include "commands/collationcmds.h"
#include "commands/comment.h"
#include "commands/dbcommands.h"
#include "commands/defrem.h"
#include "common/string.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/pg_locale.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | CollAliasData |
Functions | |
ObjectAddress | DefineCollation (ParseState *pstate, List *names, List *parameters, bool if_not_exists) |
void | IsThereCollationInNamespace (const char *collname, Oid nspOid) |
ObjectAddress | AlterCollation (AlterCollationStmt *stmt) |
Datum | pg_collation_actual_version (PG_FUNCTION_ARGS) |
Datum | pg_import_system_collations (PG_FUNCTION_ARGS) |
ObjectAddress AlterCollation | ( | AlterCollationStmt * | stmt | ) |
Definition at line 353 of file collationcmds.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, CatalogTupleUpdate(), AlterCollationStmt::collname, COLLOID, CStringGetTextDatum, elog, ereport, errmsg(), ERROR, get_collation_actual_version(), get_collation_oid(), GETSTRUCT, GetUserId(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, InvokeObjectPostAlterHook, NameListToString(), NoLock, NOTICE, OBJECT_COLLATION, ObjectAddressSet, ObjectIdGetDatum, pg_collation_ownercheck(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy1, SysCacheGetAttr(), HeapTupleData::t_self, table_close(), table_open(), TextDatumGetCString, and values.
Referenced by ProcessUtilitySlow().
ObjectAddress DefineCollation | ( | ParseState * | pstate, |
List * | names, | ||
List * | parameters, | ||
bool | if_not_exists | ||
) |
Definition at line 53 of file collationcmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, check_encoding_locale_matches(), CollationCreate(), COLLOID, CommandCounterIncrement(), defGetBoolean(), defGetQualifiedName(), defGetString(), DefElem::defname, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, errorConflictingDefElem(), get_collation_actual_version(), get_collation_oid(), get_namespace_name(), GetDatabaseEncoding(), GETSTRUCT, GetUserId(), HeapTupleIsValid, InvalidObjectAddress, is_encoding_supported_by_icu(), lc_collate_is_c(), lc_ctype_is_c(), lfirst_node, list_length(), DefElem::location, OBJECT_SCHEMA, ObjectAddressSet, ObjectIdGetDatum, OidIsValid, parser_errposition(), pg_namespace_aclcheck(), pg_newlocale_from_collation(), pg_strcasecmp(), QualifiedNameGetCreationNamespace(), ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), and TextDatumGetCString.
Referenced by ProcessUtilitySlow().
void IsThereCollationInNamespace | ( | const char * | collname, |
Oid | nspOid | ||
) |
Definition at line 325 of file collationcmds.c.
References COLLNAMEENCNSP, CStringGetDatum, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, get_namespace_name(), GetDatabaseEncoding(), GetDatabaseEncodingName(), Int32GetDatum, ObjectIdGetDatum, and SearchSysCacheExists3.
Referenced by AlterObjectNamespace_internal(), and AlterObjectRename_internal().
Datum pg_collation_actual_version | ( | PG_FUNCTION_ARGS | ) |
Definition at line 426 of file collationcmds.c.
References COLLOID, cstring_to_text(), elog, ereport, errcode(), errmsg(), ERROR, get_collation_actual_version(), GETSTRUCT, HeapTupleIsValid, ObjectIdGetDatum, PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TEXT_P, ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), and TextDatumGetCString.
Datum pg_import_system_collations | ( | PG_FUNCTION_ARGS | ) |
Definition at line 582 of file collationcmds.c.
References CollAliasData::alias, ClosePipeStream(), CollationCreate(), CommandCounterIncrement(), CreateComments(), DEBUG1, elog, CollAliasData::enc, enc, ereport, errcode(), errcode_for_file_access(), errmsg(), ERROR, get_collation_actual_version(), GetUserId(), i, len, locale, LOCALE_NAME_BUFLEN, CollAliasData::localename, name, NAMESPACEOID, ObjectIdGetDatum, OidIsValid, OpenPipeStream(), palloc(), pg_get_encoding_from_locale(), PG_GETARG_OID, pg_is_ascii(), PG_RETURN_INT32, PG_SQL_ASCII, PG_VALID_BE_ENCODING, psprintf(), pstrdup(), qsort, repalloc(), SearchSysCacheExists1, superuser(), and WARNING.