From 4a0c3a6142698c7f2f99230679dc80cd9d7e5e4e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 19 Sep 2002 22:48:34 +0000 Subject: Department of second thoughts: suppressing implicit casts everywhere in ruleutils display is not such a great idea. For arguments of functions and operators I think we'd better keep the historical behavior of showing such casts explicitly, to ensure that the function/operator is reparsed the same way when the rule is reloaded. This also makes the output of EXPLAIN less obscurantist about exactly what's happening. --- src/backend/commands/explain.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/backend/commands/explain.c') diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 4edc7184214..2478c4f769f 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994-5, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.87 2002/09/04 20:31:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.88 2002/09/19 22:48:33 tgl Exp $ * */ @@ -682,7 +682,7 @@ show_scan_qual(List *qual, bool is_or_qual, const char *qlabel, NIL); /* Deparse the expression */ - exprstr = deparse_expression(node, context, (outercontext != NULL)); + exprstr = deparse_expression(node, context, (outercontext != NULL), false); /* And add to str */ for (i = 0; i < indent; i++) @@ -729,7 +729,7 @@ show_upper_qual(List *qual, const char *qlabel, /* Deparse the expression */ node = (Node *) make_ands_explicit(qual); - exprstr = deparse_expression(node, context, (inner_plan != NULL)); + exprstr = deparse_expression(node, context, (inner_plan != NULL), false); /* And add to str */ for (i = 0; i < indent; i++) @@ -795,8 +795,9 @@ show_sort_keys(List *tlist, int nkeys, const char *qlabel, if (target->resdom->reskey == keyno) { - /* Deparse the expression */ - exprstr = deparse_expression(target->expr, context, useprefix); + /* Deparse the expression, showing any top-level cast */ + exprstr = deparse_expression(target->expr, context, + useprefix, true); /* And add to str */ if (keyno > 1) appendStringInfo(str, ", "); -- cgit v1.2.3