[v9.2] LEAKPROOF attribute of FUNCTION (Re: [v9.2] Fix Leaky View Problem)

Kohei KaiGai <kaigai@kaigai.gr.jp>

From: Kohei KaiGai <kaigai@kaigai.gr.jp>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Noah Misch <noah@leadboat.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, Kohei.Kaigai@emea.nec.com, thom@linux.com, pgsql-hackers@postgresql.org
Date: 2012-01-08T15:52:04Z
Lists: pgsql-hackers

Attachments

>> BTW, can you also resubmit the leakproof stuff as a separate patch for
>> the last CF?  Want to make sure we get that into 9.2, if at all
>> possible.
>>
> Yes, it shall be attached on the next message.
>
The attached patch adds LEAKPROOF attribute to pg_proc; that
enables DBA to set up obviously safe functions to be pushed down
into sub-query even if it has security-barrier attribute.
We assume this LEAKPROOF attribute shall be applied on operator
functions being used to upgrade execute plan from Seq-Scan to
Index-Scan.

The default is without-leakproof attribute on creation of functions,
and it requires superuser privilege to switch on.

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>