Re: Why does contain_leaked_vars believe MinMaxExpr is safe?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why does contain_leaked_vars believe MinMaxExpr is safe?
Date: 2015-05-13 13:34:53
Message-ID: CA+TgmoZn74=oGfxL-0aCH35hnFxv1N6vVn15kH5Evy2XNDguGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 12, 2015 at 7:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> MinMaxExpr is an implicit invocation of a btree comparison function.
> Are we supposing that all of those are necessarily leakproof?

I suspect it's an oversight, because the comment gives no hint that
any such intention was present. It's been more than three years since
I committed that code (under a different function name) so my memory
is a little fuzzy, but I believe it just didn't occur to me that
MinMaxExpr could include a function call.

I suspect it's safe in practice, but in theory it's probably a bug.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-05-13 13:45:47 Re: Sequence Access Method WIP
Previous Message Robert Haas 2015-05-13 13:29:49 Re: Streaming replication and WAL archive interactions