Re: [HACKERS] [PATCH] A hook for session start - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: [HACKERS] [PATCH] A hook for session start
Date
Msg-id CAFcNs+pe-5vQh26qpZmbakV=tkN5REPXbTj2rdFtaTHK=EZtuQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] A hook for session start  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] [PATCH] A hook for session start  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers


On Thu, Nov 9, 2017 at 9:08 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
>
> On Fri, Nov 10, 2017 at 2:32 AM, Fabrízio de Royes Mello
> <fabriziomello@gmail.com> wrote:
> > On Thu, Nov 9, 2017 at 12:09 AM, Michael Paquier <michael.paquier@gmail.com>
> > wrote:
> >> +++ b/src/test/modules/test_session_hooks/session_hooks.conf
> >> @@ -0,0 +1 @@
> >> +shared_preload_libraries = 'test_session_hooks'
> >> Don't you think that this should be a GUC? My previous comment
> >> outlined that. I won't fight hard on that point in any case, don't
> >> worry. I just want to make things clear :)
> >
> > Ooops... my fault... fixed!
> >
> > Thanks again!!
>
> +/* GUC variables */
> +static char *session_hook_username = NULL;
> This causes the module to crash if test_session_hooks.username is not
> set. I would recommend just assigning a default value, say "postgres".


Fixed.

New version attached.

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
Attachment

pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: [HACKERS] pg_upgrade to clusters with a different WAL segment size
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Simplify ACL handling for large objects and removal ofsuperuser() checks