projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6382452
)
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:18 +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 2c5e3da80c8485495cf19fc22cc12b8bca5469dd..b51d5638c6c29cdee1a27d9c6c0a560966b8c3f0 100644
(file)
--- a/
src/parser/outfuncs.c
+++ b/
src/parser/outfuncs.c
@@
-5448,8
+5448,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
{