From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-sql@postgresql.org
Subject: Re: on connect/on disconnect
Date: Mon, 11 Sep 2006 12:31:43 +0200
Message-ID: <45053B0F.5020109@logix-tt.com> (raw)
In-Reply-To: <4504B474.9010801@cs.anu.edu.au>
References: <4504B474.9010801@cs.anu.edu.au>
Hi, Robert,
Robert Edwards wrote:
> (this is my first post to this list...)
Welcome here. :-)
> I am wondering if Postgres, and/or SQL in general, has a facility to
> run a function at connection set-up time (after a successful connection
> attempt) and/or at session completion (or disconnect)?
Most JDBC connection pooling implementations will do that, at least for
connection and session setup. (JBoss is one of them.)
> I want to pre-populate a table (actually an INSERT rule on a view)
> with some user-specific data that is unlikely to change during the
> session and which is "difficult" to process (ie. affects performance
> to do it too often).
The problem here is that the INSERT rule might be globally visible to
other, concurrent users on the database.
Could you explain what exactly you want to achieve, may be we find a
better way to do the whole thing.
> Purely session/connection-based temporary tables would also do what
> I need, but temporary tables don't seem to be able to work that way.
What's the exact problem with them?
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: schabi@logix-tt.com
Subject: Re: on connect/on disconnect
In-Reply-To: <45053B0F.5020109@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox