Re: [v9.2] LEAKPROOF attribute of FUNCTION (Re: [v9.2] Fix Leaky View Problem)
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Kohei KaiGai <kaigai@kaigai.gr.jp>
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-02-14T03:44:17Z
Lists: pgsql-hackers
Attachments
- not-leakproof.patch (application/octet-stream) patch
On Mon, Feb 13, 2012 at 7:51 AM, Kohei KaiGai <kaigai@kaigai.gr.jp> wrote: > I rebased the patch due to the updates of pg_proc.h. > > Please see the newer one. Thanks, Thanks, committed. I think, though, that some further adjustment is needed here, because you currently can't do ALTER FUNCTION ... NO LEAKPROOF, which seems unacceptable. It's fairly clear why not, though: you get a grammar conflict, because the parser allows this: create or replace function z() returns int as $$select 1$$ language sql set transaction not deferrable; However, since that syntax doesn't actually work, I'm thinking we could just refactor things a bit to reject that at the parser stage. The attached patch adopts that approach. Anyone have a better idea? I also think we ought to stick create_function_3 into one of the parallel groups in the regression tests, if possible. Can you investigate that? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company