projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
572aad4
)
Fix outfuncs.c to support PostgreSQL 12 CTE [NOT] MATERIALIZED.
author
Bo Peng
<pengbo@sraoss.co.jp>
Thu, 5 Sep 2019 12:00:46 +0000
(21:00 +0900)
committer
Bo Peng
<pengbo@sraoss.co.jp>
Thu, 5 Sep 2019 12:06:00 +0000
(21:06 +0900)
src/parser/outfuncs.c
patch
|
blob
|
blame
|
history
diff --git
a/src/parser/outfuncs.c
b/src/parser/outfuncs.c
index c2ddf5e89a2fa82240cb93e16b945e4bc0cf0273..b02ffbaca02f18e6dce7f4d67774ba7abdaab07b 100644
(file)
--- a/
src/parser/outfuncs.c
+++ b/
src/parser/outfuncs.c
@@
-1535,7
+1535,14
@@
_outCommonTableExpr(String * str, CommonTableExpr *node)
string_append_char(str, ") ");
}
- string_append_char(str, "AS (");
+ string_append_char(str, "AS ");
+
+ if (node->ctematerialized & CTEMaterializeAlways)
+ string_append_char(str, "MATERIALIZED ");
+ else if (node->ctematerialized & CTEMaterializeNever)
+ string_append_char(str, "NOT MATERIALIZED ");
+
+ string_append_char(str, "(");
_outNode(str, node->ctequery);
string_append_char(str, ")");
}