Re: [PATCH] A hook for session start

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Fabrízio Mello <fabriziomello@gmail.com>
Cc: Aleksandr Parfenov <a.parfenov@postgrespro.ru>, Pgsql Hackers <pgsql-hackers@postgresql.org>, Yugo Nagata <nagata@sraoss.co.jp>
Date: 2017-11-04T03:23:32Z
Lists: 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


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add hooks for session start and session end, take two