Inconsistency in Output function of MergeJoin
While working on read functions for plan nodes (required for
parallelism), it has been observed [1]/messages/by-id/9A28C8860F777E439AA12E8AEA7694F80114956C@BPXM15GP.gisp.nec.co.jp by KaiGai and separately
by me that function _outMergeJoin(), appends boolean in a
slightly different way as compare to other out functions like
_outSort(). Is there a reason of doing so which is is not apparent
from code or comments?
Attached patch makes _outMergeJoin() consistent with other _out
functions which appends boolean to string.
[1]: /messages/by-id/9A28C8860F777E439AA12E8AEA7694F80114956C@BPXM15GP.gisp.nec.co.jp
/messages/by-id/9A28C8860F777E439AA12E8AEA7694F80114956C@BPXM15GP.gisp.nec.co.jp
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachments:
fix_outMergeJoin_inconsistency_v1.patchapplication/octet-stream; name=fix_outMergeJoin_inconsistency_v1.patchDownload
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index e1b49d57..3722200 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -649,7 +649,7 @@ _outMergeJoin(StringInfo str, const MergeJoin *node)
appendStringInfoString(str, " :mergeNullsFirst");
for (i = 0; i < numCols; i++)
- appendStringInfo(str, " %d", (int) node->mergeNullsFirst[i]);
+ appendStringInfo(str, " %s", booltostr(node->mergeNullsFirst[i]));
}
static void
On Wed, Sep 23, 2015 at 5:56 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
While working on read functions for plan nodes (required for
parallelism), it has been observed [1] by KaiGai and separately
by me that function _outMergeJoin(), appends boolean in a
slightly different way as compare to other out functions like
_outSort(). Is there a reason of doing so which is is not apparent
from code or comments?Attached patch makes _outMergeJoin() consistent with other _out
functions which appends boolean to string.
Seems right to me. I'll go commit this.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers