1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2002-09-19 22:48:34 +00:00
parent b26dfb9522
commit 4a0c3a6142
6 changed files with 93 additions and 71 deletions

View File

@ -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, ", ");