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

Commit5f4a1a0

Browse files
committed
Throw a more on-point error for publications depending on columns.
Same as42b0412, except that the trouble case is a publicationWHERE clause that depends on a column.Again reported by Alexander Lakhin. Back-patch to v15 wherewe added publication WHERE clauses.Discussion:https://postgr.es/m/548a47bc-87ae-b3df-c6a2-60b9966f808b@gmail.com
1 parentda55e4c commit5f4a1a0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12816,6 +12816,20 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
1281612816
RememberStatisticsForRebuilding(foundObject.objectId, tab);
1281712817
break;
1281812818

12819+
case OCLASS_PUBLICATION_REL:
12820+
12821+
/*
12822+
* Column reference in a PUBLICATION ... FOR TABLE ... WHERE
12823+
* clause. Same issues as above. FIXME someday.
12824+
*/
12825+
ereport(ERROR,
12826+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
12827+
errmsg("cannot alter type of a column used by a publication WHERE clause"),
12828+
errdetail("%s depends on column \"%s\"",
12829+
getObjectDescription(&foundObject, false),
12830+
colName)));
12831+
break;
12832+
1281912833
case OCLASS_TYPE:
1282012834
case OCLASS_CAST:
1282112835
case OCLASS_COLLATION:
@@ -12845,7 +12859,6 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
1284512859
case OCLASS_PARAMETER_ACL:
1284612860
case OCLASS_PUBLICATION:
1284712861
case OCLASS_PUBLICATION_NAMESPACE:
12848-
case OCLASS_PUBLICATION_REL:
1284912862
case OCLASS_SUBSCRIPTION:
1285012863
case OCLASS_TRANSFORM:
1285112864

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp