On Mon, May 11, 2015 at 6:53 PM, Peter Geoghegan <p...@heroku.com> wrote:
> Attached patch fixes some issues with ON CONFLICT DO UPDATE/DO
> NOTHING. There is a commit message which explains the changes at a
> high level.

I just realized that there is a silly bug here. Attached is a fix that
applies on top of the original.


-- 
Peter Geoghegan
From 1b32558d188762eb5c7214ea5ae042897e7d004f Mon Sep 17 00:00:00 2001
From: Peter Geoghegan <peter.geoghega...@gmail.com>
Date: Mon, 11 May 2015 19:02:12 -0700
Subject: [PATCH 2/2] Add closing bracket

---
 src/backend/utils/adt/ruleutils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 355acc9..aa21693 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -7768,6 +7768,9 @@ get_rule_expr(Node *node, deparse_context *context,
 				get_rule_expr((Node *) iexpr->expr,
 							  context, showimplicit);
 
+				if (need_parens)
+					appendStringInfoChar(buf, ')');
+
 				context->varprefix = varprefix;
 
 				if (iexpr->infercollid)
@@ -7782,8 +7785,6 @@ get_rule_expr(Node *node, deparse_context *context,
 
 					get_opclass_name(inferopclass, inferopcinputtype, buf);
 				}
-				if (need_parens)
-					appendStringInfoChar(buf, ')');
 			}
 			break;
 
-- 
1.9.1

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to