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

From Michael Paquier
Subject Re: [HACKERS] [PATCH] A hook for session start
Date
Msg-id CAB7nPqRjZr-Qwrt8bnj=S4PJOwDOrOnaoQ620euK5tGmOhkj1g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] A hook for session start  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: [HACKERS] [PATCH] A hook for session start  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On Fri, Nov 3, 2017 at 1:55 PM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
>> Passing the database name and user name does not look much useful to
>> me. You can have access to this data already with CurrentUserId and
>> MyDatabaseId.
>
> This way we don't need to convert oid to names inside hook code.

Well, arguments of hooks are useful if they are used. Now if I look at
the two examples mainly proposed in this thread, be it in your set of
patches or the possibility to do some SQL transaction, I see nothing
using them. So I'd vote for keeping an interface minimal.
--
Michael


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Exclude pg_internal.init from base backup
Next
From: Noah Misch
Date:
Subject: [HACKERS] Re: [COMMITTERS] pgsql: Account for catalog snapshot in PGXACT->xminupdates.