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

Commit332fdbe

Browse files
committed
postgres_fdw: Promote an Assert() to elog().
Andreas Seltenreich reports that it is possible for a PlaceHolderVarto creep into this tlist, and I fear that even after that's fixed wemight have other, similar bugs in this area either now or in thefuture. There's a lot of action-at-a-distance here, because thevalidity of this assertion depends on core planner behavior; so, let'suse elog() to make sure we catch this even in non-assert builds,rather than just crashing.
1 parent783cb6e commit332fdbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎contrib/postgres_fdw/deparse.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,8 +1112,10 @@ deparseExplicitTargetList(List *tlist, List **retrieved_attrs,
11121112
/* Extract expression if TargetEntry node */
11131113
Assert(IsA(tle,TargetEntry));
11141114
var= (Var*)tle->expr;
1115+
11151116
/* We expect only Var nodes here */
1116-
Assert(IsA(var,Var));
1117+
if (!IsA(var,Var))
1118+
elog(ERROR,"non-Var not expected in target list");
11171119

11181120
if (i>0)
11191121
appendStringInfoString(buf,", ");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp