Re: Create trigger on after logon on schema

From: Erik Brandsberg <erik(at)heimdalldata(dot)com>
To: aditya desai <admad123(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: Create trigger on after logon on schema
Date: 2021-10-06 18:26:58
Message-ID: CAFcck8EdwTi4BmYfHO-ve=q98ToRbw33568uA8MU8oyX9RrW-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Following up to Steve Midgley's comment, Heimdall Data provides a proxy
that can provide this level of auditing, and even trigger insertion of read
queries into an audit table if you want. Disclaimer, I'm the CTO of
Heimdall Data...

On Wed, Oct 6, 2021 at 12:09 PM aditya desai <admad123(at)gmail(dot)com> wrote:

> Hi Depesz,
> Sorry , I didn't mention it clearly. We are using these triggers for audit
> purposes.
>
> Triggers calls a procedure to insert username,machine.IPAddress into
> LogonTime in an audit table.
> We also have a trigger that gets fired BEFORE ALTER OR CREATE OR DROP on
> schema that will audit the user details in the audit table.
>
> Any alternative solution in Postgres is welcome.
>
> Thanks in advance.
>
> Regards,
> Aditya.
>
>
>
> On Wed, Oct 6, 2021 at 9:14 PM hubert depesz lubaczewski <
> depesz(at)depesz(dot)com> wrote:
>
>> On Wed, Oct 06, 2021 at 08:52:45PM +0530, aditya desai wrote:
>> > Hi,
>> > Is there any way to write below Oracle trigger in postgres?
>> >
>> > CREATE TRIGGER T1 after logon on schema for each row
>> > execute procedure p1;
>>
>> What did it do?
>>
>> Please note that not everyone knowing Pg knows Oracle.
>>
>> I can imagine that trigger after logon means that p1 procedure will be
>> called after user successfully logs in, but what does the "for each row"
>> part mean?
>>
>> In PG, there are no login triggers. And, in any case, noone logs to
>> "schema".
>>
>> Best regards,
>>
>> depesz
>>
>>

--
*Erik Brandsberg*
erik(at)heimdalldata(dot)com

www.heimdalldata.com
+1 (866) 433-2824 x 700
[image: AWS Competency Program]
<https://aws.amazon.com/partners/find/partnerdetails/?n=Heimdall%20Data&id=001E000001d9pndIAA>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message aditya desai 2021-10-07 05:19:30 Re: Create trigger on after logon on schema
Previous Message Steve Midgley 2021-10-06 18:16:04 Re: Create trigger on after logon on schema