mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +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:
@ -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, ", ");
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.13 2002/09/04 20:31:16 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.14 2002/09/19 22:48:33 tgl Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@ -514,7 +514,7 @@ DefineDomain(CreateDomainStmt *stmt)
|
||||
defaultValue = deparse_expression(defaultExpr,
|
||||
deparse_context_for(domainName,
|
||||
InvalidOid),
|
||||
false);
|
||||
false, false);
|
||||
defaultValueBin = nodeToString(defaultExpr);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user