projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8011925
)
Avoid generating excess (and illegal) parentheses around an aliased JOIN
author
Tom Lane
<
[email protected]
>
Mon, 13 Dec 2004 00:33:18 +0000
(
00:33
+0000)
committer
Tom Lane
<
[email protected]
>
Mon, 13 Dec 2004 00:33:18 +0000
(
00:33
+0000)
in prettyprint mode. Andreas Pflug
src/backend/utils/adt/ruleutils.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/ruleutils.c
b/src/backend/utils/adt/ruleutils.c
index 48407038c57dfd0d7fcd617a8855c0479c27875b..78375a9f98c77eb68d9a9068ab669faf9a27f909 100644
(file)
--- a/
src/backend/utils/adt/ruleutils.c
+++ b/
src/backend/utils/adt/ruleutils.c
@@
-3816,7
+3816,8
@@
get_from_clause_item(Node *jtnode, Query *query, deparse_context *context)
bool need_paren_on_right;
need_paren_on_right = PRETTY_PAREN(context) &&
- !IsA(j->rarg, RangeTblRef);
+ !IsA(j->rarg, RangeTblRef) &&
+ !(IsA(j->rarg, JoinExpr) && ((JoinExpr*)j->rarg)->alias != NULL);
if (!PRETTY_PAREN(context) || j->alias != NULL)
appendStringInfoChar(buf, '(');