Re: Trigger to run @ connection time? - Mailing list pgsql-general

From Tom Lane
Subject Re: Trigger to run @ connection time?
Date
Msg-id 6187.1205270905@sss.pgh.pa.us
Whole thread Raw
In response to Re: Trigger to run @ connection time?  ("Kynn Jones" <kynnjo@gmail.com>)
Responses Re: Trigger to run @ connection time?  ("Kynn Jones" <kynnjo@gmail.com>)
Re: Trigger to run @ connection time?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Re: Trigger to run @ connection time?  ("Dawid Kuroczko" <qnex42@gmail.com>)
Re: Trigger to run @ connection time?  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-general
"Kynn Jones" <kynnjo@gmail.com> writes:
> If one can set up this insert operation so that it happens automatically
> whenever a new connection is made, I'd like to learn how it's done.

For manual psql sessions, you can put some setup commands in ~/.psqlrc.
In any other context I'm afraid you're stuck with modifying your client
application code.

An ON CONNECT trigger enforced by the database seems a bit scary to me.
If it's broken, how you gonna get into the DB to fix it?

            regards, tom lane

pgsql-general by date:

Previous
From: "Rob Wultsch"
Date:
Subject: Re: postgre vs MySQL
Next
From: Thomas Kellerer
Date:
Subject: Re: How to convert postgres timestamp to date: yyyy-mm-dd