Re: DISCARD ALL (Again)
От | Tom Lane |
---|---|
Тема | Re: DISCARD ALL (Again) |
Дата | |
Msg-id | 24346.1397833581@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: DISCARD ALL (Again) (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > On 4/17/14, 8:24 PM, Tom Lane wrote: >> We could in fact implement #2, I imagine, by destroying and recreating >> the entire language interpreter. So I could imagine implementing a >> "DISCARD INTERPRETERS" kind of command that would zap the current >> interpreter(s) for whichever PL languages happened to feel like >> cooperating with the command. > More generally, any extension could maintain any kind of cross-call > state. plproxy, dblink, pgmemcache come to mind. A general hook into > DISCARD might be doable, but then it's not clear how to categorize this > into DISCARD subcommands. Right. So if we go down that path, we're basically giving up the ability to define what DISCARD ALL does by specifying an equivalent list of subcommands. Maybe that's an acceptable tradeoff, but I don't like it much. I wonder whether we could have a "DISCARD identifier" variant where any hooked-in extension could recognize the identifier and zap some appropriate subset of its own state. This would get us to a situation where we could say "DISCARD ALL is the union of all DISCARD operations, but some of those are documented in relevant extensions' docs rather than here". The permissions problem remains, of course. regards, tom lane
В списке pgsql-hackers по дате отправления: