Search Postgresql Archives

Re: Trigger to run @ connection time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Tom Lane wrote:

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?

At the protocol level, when the opening of a new session is requested, how about a "skip connect-trigger" run-time parameter? This parameter would be ignored (or an error being raised) if the connect isn't issued by the owner of the database or a superuser. Within client applications, the functionality could then be implemented at the same level than the other connection parameters, I'm thinking of a checkbox in a GUI or an additional parameter to the \connect psql command.

By comparison, Oracle's solution to this is a grantable privilege that causes their "logon triggers" to ignore any error.

--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux