projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79831b3
)
Fix query rewrite syntax error of "INSERT ... ON CONFLICT" in native replication...
author
Bo Peng
<pengbo@sraoss.co.jp>
Tue, 17 Nov 2020 03:45:37 +0000
(12:45 +0900)
committer
Bo Peng
<pengbo@sraoss.co.jp>
Tue, 17 Nov 2020 03:51:25 +0000
(12:51 +0900)
per bug 654.
src/parser/outfuncs.c
patch
|
blob
|
blame
|
history
diff --git
a/src/parser/outfuncs.c
b/src/parser/outfuncs.c
index 24ed4b35f71d0836feffc1391482f16605689ce1..01b06c1365761c58adb46aecbfc44356dd54f11b 100644
(file)
--- a/
src/parser/outfuncs.c
+++ b/
src/parser/outfuncs.c
@@
-5432,8
+5432,12
@@
_outOnConflictClause(String *str, OnConflictClause *node)
string_append_char(str, " ( ");
_outList(str, node->infer->indexElems);
string_append_char(str, " ) ");
- string_append_char(str, " WHERE ");
- _outNode(str, node->infer->whereClause);
+
+ if (node->infer->whereClause)
+ {
+ string_append_char(str, " WHERE ");
+ _outNode(str, node->infer->whereClause);
+ }
}
else
{