From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | dmitriy(at)riabov(dot)info, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14877: DISCARD ALL incorrectly resets user parameters |
Date: | 2017-10-27 14:22:15 |
Message-ID: | CAFcNs+qUXnNcxMS5WV009eCtHeD+4xw_yeb6pSXy1uFQxhn4+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Oct 27, 2017 at 12:05 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Fri, Oct 27, 2017 at 6:43 AM, Fabrízio de Royes Mello <
fabriziomello(at)gmail(dot)com> wrote:
>>
>>
>> > Bug reference: 14877
>> > Logged by: Dmitriy Riabov
>> >
>> Why do you think this wrong? This is the default behavior of DISCARD ALL
since when 8.3 introduced it.
>>
>
> Docs say DISCARD ALL means:
>
> SET SESSION AUTHORIZATION DEFAULT;
> RESET ALL;
> DEALLOCATE ALL;
> CLOSE ALL;
> UNLISTEN *;
> SELECT pg_advisory_unlock_all();
> DISCARD PLANS;
> DISCARD SEQUENCES;
> DISCARD TEMP;
>
> The "RESET ALL" command is what causes the GUCs to be reset. If you
don't wish for them to be reset create a function the does all of the above
minus the RESET ALL.
>
I wonder if be nice to have some new DISCARD construct to cover different
use cases, something like:
DISCARD { ALL | PLANS | TEMP | SEQUENCES | ( { SESSION AUTHORIZARION |
RESET | PREPARED STATEMENT | CURSORS | NOTIFY | ADVISORY LOCKS | PLANS |
SEQUENCES | TEMP } [, ...] ) }
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2017-10-27 14:26:39 | Re: BUG #14877: DISCARD ALL incorrectly resets user parameters |
Previous Message | David G. Johnston | 2017-10-27 14:05:44 | Re: BUG #14877: DISCARD ALL incorrectly resets user parameters |