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

Commit979766c

Browse files
committed
Correct the command tags for ALTER ... RENAME COLUMN.
Previously ALTER MATERIALIZED VIEW / FOREIGN TABLE ... RENAME COLUMN ...returned "ALTER TABLE" as a command tag. This commit fixes them so thatthey return "ALTER MATERIALIZED VIEW" and "ALTER FOREIGN TABLE" ascommand tags, respectively.This issue exists in all supported versions, but we don't back-patch thisbecause it's not enough of a bug to justify taking any compatibility risks for.Otherwise, the back-patch would cause minor version update to break,for example, the existing event trigger functions using TG_TAG.Author: Fujii MasaoReviewed-by: Ibrar AhmedDiscussion:https://postgr.es/m/CAHGQGwGUaC03FFdTFoHsCuDrrNvFvNVQ6xyd40==P25WvuBJjg@mail.gmail.com
1 parenta386942 commit979766c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/tcop/utility.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,14 @@ CreateCommandTag(Node *parsetree)
23992399
break;
24002400

24012401
caseT_RenameStmt:
2402-
tag=AlterObjectTypeCommandTag(((RenameStmt*)parsetree)->renameType);
2402+
/*
2403+
* When the column is renamed, the command tag is created
2404+
* from its relation type
2405+
*/
2406+
tag=AlterObjectTypeCommandTag(
2407+
((RenameStmt*)parsetree)->renameType==OBJECT_COLUMN ?
2408+
((RenameStmt*)parsetree)->relationType :
2409+
((RenameStmt*)parsetree)->renameType);
24032410
break;
24042411

24052412
caseT_AlterObjectDependsStmt:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp