Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0717f2f

Browse files
committed
Fix ALTER COLLATION "default" REFRESH VERSION.
Issue a helpful error message rather than an internal error.Discussion:https://postgr.es/m/51fb77507cafd43fc1a2e733c23045873d93ae60.camel%40j-davis.comReviewed-by: Thomas Munro
1 parent10932ed commit0717f2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/backend/commands/collationcmds.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,11 @@ AlterCollation(AlterCollationStmt *stmt)
366366
rel=table_open(CollationRelationId,RowExclusiveLock);
367367
collOid=get_collation_oid(stmt->collname, false);
368368

369+
if (collOid==DEFAULT_COLLATION_OID)
370+
ereport(ERROR,
371+
(errmsg("cannot refresh version of default collation"),
372+
errhint("Use ALTER DATABASE ... REFRESH COLLATION VERSION instead.")));
373+
369374
if (!pg_collation_ownercheck(collOid,GetUserId()))
370375
aclcheck_error(ACLCHECK_NOT_OWNER,OBJECT_COLLATION,
371376
NameListToString(stmt->collname));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp