mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
DDL support for collations
- collowner field - CREATE COLLATION - ALTER COLLATION - DROP COLLATION - COMMENT ON COLLATION - integration with extensions - pg_dump support for the above - dependency management - psql tab completion - psql \dO command
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include "catalog/pg_largeobject.h"
|
||||
#include "catalog/pg_namespace.h"
|
||||
#include "commands/alter.h"
|
||||
#include "commands/collationcmds.h"
|
||||
#include "commands/conversioncmds.h"
|
||||
#include "commands/dbcommands.h"
|
||||
#include "commands/defrem.h"
|
||||
@ -53,6 +54,10 @@ ExecRenameStmt(RenameStmt *stmt)
|
||||
RenameAggregate(stmt->object, stmt->objarg, stmt->newname);
|
||||
break;
|
||||
|
||||
case OBJECT_COLLATION:
|
||||
RenameCollation(stmt->object, stmt->newname);
|
||||
break;
|
||||
|
||||
case OBJECT_CONVERSION:
|
||||
RenameConversion(stmt->object, stmt->newname);
|
||||
break;
|
||||
@ -185,6 +190,10 @@ ExecAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt)
|
||||
stmt->newschema);
|
||||
break;
|
||||
|
||||
case OBJECT_COLLATION:
|
||||
AlterCollationNamespace(stmt->object, stmt->newschema);
|
||||
break;
|
||||
|
||||
case OBJECT_CONVERSION:
|
||||
AlterConversionNamespace(stmt->object, stmt->newschema);
|
||||
break;
|
||||
@ -302,6 +311,10 @@ AlterObjectNamespace_oid(Oid classId, Oid objid, Oid nspOid)
|
||||
oldNspOid = AlterTypeNamespace_oid(objid, nspOid);
|
||||
break;
|
||||
|
||||
case OCLASS_COLLATION:
|
||||
oldNspOid = AlterCollationNamespace_oid(objid, nspOid);
|
||||
break;
|
||||
|
||||
case OCLASS_CONVERSION:
|
||||
oldNspOid = AlterConversionNamespace_oid(objid, nspOid);
|
||||
break;
|
||||
@ -478,6 +491,10 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
AlterAggregateOwner(stmt->object, stmt->objarg, newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_COLLATION:
|
||||
AlterCollationOwner(stmt->object, newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_CONVERSION:
|
||||
AlterConversionOwner(stmt->object, newowner);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user