Re: shell script when a user logs in - Mailing list pgsql-general

From Oliver Elphick
Subject Re: shell script when a user logs in
Date
Msg-id 1042357378.7660.108.camel@linda.lfix.co.uk
Whole thread Raw
In response to shell script when a user logs in  ("Campano, Troy" <Troy.Campano@LibertyMutual.com>)
List pgsql-general
On Fri, 2003-01-10 at 18:56, Campano, Troy wrote:
> Is there a shell script that executes when a user logs into
> postgresql?
>
> I wanted to do something like this. I modified the pg_ctl shell script
> so that it emails me when someone users pg_ctl to start/stop/etc the
> postgresql database.
>
> So I was wondering if there was something similar I could edit to
> email me when a user logs in and/or logs out from postgresql.

Assuming this is Unix, you can do this in the login script in the
postgresql home directory.  What this is called varies with the shell
you are using: for Bourne shell it is .profile, for Cshell it is .login,
for bash it is .bash_profile, .bash_login and .profile.

If you are system administrator, you should be able to get the same
information more easily and reliably from the system logs.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "For the LORD is good; his mercy is everlasting; and
      his truth endureth to all generations."
                                     Psalms 100:5


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Mailing list archive feature request
Next
From: "karthikeyan.balasubramanian"
Date:
Subject: PostgreSQL Startup Problem on Win98