Re: PoC plpgsql - possibility to force custom or generic plan
Greg Stark <stark@mit.edu>
From: Greg Stark <stark@mit.edu>
To: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-27T12:14:22Z
Lists: pgsql-hackers
On 25 January 2017 at 20:06, Jim Nasby <Jim.Nasby@bluetreble.com> wrote: > GUCs support SET LOCAL, but that's not the same as local scoping because the > setting stays in effect unless the substrans aborts. What I'd like is the > ability to set a GUC in a plpgsql block *and have the setting revert on > block exit*. I'm wondering which GUCs you have in mind to use this with. Because what you're describing is dynamic scoping and I'm wondering if what you're really looking for is lexical scoping. That would be more in line with how PL/PgSQL variables are scoped and with how #pragmas usually work. But it would probably not be easy to reconcile with how GUCs work. -- greg
Commits
-
Add plan_cache_mode setting
- f7cb2842bf47 12.0 landed
-
Add some noreturn attributes to help static analyzers
- a044378ce2f6 11.0 cited
-
document when PREPARE uses generic plans
- fab9d1da4a21 9.6.0 cited
-
Redesign the plancache mechanism for more flexibility and efficiency.
- e6faf910d750 9.2.0 cited