Re: Trigger when user logs in

Поиск
Список
Период
Сортировка
От Dan Langille
Тема Re: Trigger when user logs in
Дата
Msg-id 55b0b38f-2f79-4163-b34f-7a98d9383ce5@www.fastmail.com
обсуждение исходный текст
Ответ на Re: Trigger when user logs in  ("Schneider, Jeremy" <schnjere@amazon.com>)
Список pgsql-general
Pushover.net comes to mind. 

The email sending should not delay login. 

If you want notifications,  look at mqtt. 


Lightweight, non-pausing solution. 

HTH

--
  Dan Langille
  dan@langille.org



On Sat, Apr 13, 2019, at 9:16 PM, Schneider, Jeremy wrote:

> On Apr 13, 2019, at 17:28, Schneider, Jeremy <schnjere@amazon.com> wrote:

>> On Apr 11, 2019, at 19:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 
>> Ron <ronljohnsonjr@gmail.com> writes:
>>> I bet requests like this will start to make it onto the beaten path.
>> 
>> Meh.  I'm not that excited about inventing our own versions of wheels
>> that already exist, especially when there's nothing very Postgres-specific
>> about the requirements.  Notice that the example I pointed you at is for
>> sshd not Postgres.  IMO the fact that you can use the same tool to solve
>> both cases is a good thing.

> This might work for sending an email, but not very useful if I want to do something in the database.

> For example, one very common use of logon triggers in other databases is to look at various connection parameters (like username or source IP) and enable sql logging or debugging for only certain cases (not always doing the same thing for a particular user). Another common use case is to do something like running plpgsql or manipulating data in db tables - but again looking at some combination of things at a database level to make a decision about what to do; for example the application itself might enable or disable certain behaviors by setting values in a configuration table.

Probably worth mentioning that I’m all for solving this in the application - just that I’ve experienced many cases in the past where it wasn’t feasible or even possible to get the sorts of changes I’d need into applications using the databases that I was responsible for.

> I’m still trying to work out the best approach for solving these sorts of use cases in current versions of PostgreSQL... I’m curious how others are solving this?


В списке pgsql-general по дате отправления:

Предыдущее
От: "Schneider, Jeremy"
Дата:
Сообщение: Re: Trigger when user logs in
Следующее
От: Ron
Дата:
Сообщение: Re: Trigger when user logs in