Re: Possible bug in CASE evaluation

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible bug in CASE evaluation
Date: 2013-06-25 01:35:53
Message-ID: 20130625013553.GA840390@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 22, 2013 at 04:54:50PM +0200, Andres Freund wrote:
> On 2013-06-21 16:45:28 +0200, Andres Freund wrote:
> > On 2013-06-21 09:51:05 -0400, Noah Misch wrote:
> > > That being said, if we discover a simple-enough fix that performs well, we may
> > > as well incorporate it.
> >
> > What about passing another parameter down eval_const_expressions_mutator
> > (which is static, so changing the API isn't a problem) that basically
> > tells us whether we actually should evaluate expressions or just perform
> > the transformation?
> > There's seems to be basically a couple of places where we call dangerous
> > things:
> > * simplify_function (via ->evaluate_function->evaluate_expr) which is
> > called in a bunch of places
> > * evaluate_expr which is directly called in T_ArrayExpr
> > T_ArrayCoerceExpr
> >
> > All places I've inspected so far need to deal with simplify_function
> > returning NULL anyway, so that seems like a viable fix.
>
> *Prototype* patch - that seems simple enough - attached. Opinions?

Simple enough, yes. The other point still stands.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2013-06-25 01:38:48 Re: C++ compiler
Previous Message Robert Haas 2013-06-25 01:13:00 Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]