Re: [SQL] on connect/on disconnect

2006-09-12 Thread Aaron Bono
On 9/11/06, Robert Edwards <[EMAIL PROTECTED]> wrote: Markus Schaber wrote:> 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

Re: [SQL] on connect/on disconnect

2006-09-11 Thread Robert Edwards
Markus Schaber wrote: 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 comple

Re: [SQL] on connect/on disconnect

2006-09-11 Thread Jorge Godoy
Robert Edwards <[EMAIL PROTECTED]> writes: > Or is it possible, over the same connection, to change the database > user? My understanding of the frontend/backend protocol is that this > is not allowed. It is possible to change users. SET SESSION AUTHORIZATION ; http://www.postgresql.org/docs/

Re: [SQL] on connect/on disconnect

2006-09-11 Thread Markus Schaber
Hi, Robert, Robert Edwards wrote: > Or is it possible, over the same connection, to change the database > user? My understanding of the frontend/backend protocol is that this > is not allowed. Not on protocol level, but one level higher. SET SESSION AUTHORIZATION ; pg_dump uses this frequent

Re: [SQL] on connect/on disconnect

2006-09-11 Thread Markus Schaber
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)?

Re: [SQL] on connect/on disconnect

2006-09-10 Thread Aaron Bono
On 9/10/06, Robert Edwards <[EMAIL PROTECTED]> wrote: As I understand it, connection pooling, as used by a web app, stillneeds to connect "per-database-user" (and usually this is the same"web-server" user). If the web app is connecting to the database server as different database users, then differ

Re: [SQL] on connect/on disconnect

2006-09-10 Thread Robert Edwards
Hi Aaron, Thanks for your response. I guess I wasn't clear about "users". I am referring to database users, not application users (although they are the same in my application in any case - that is, each application user is known to the database as a different database user). As I understand it

Re: [SQL] on connect/on disconnect

2006-09-10 Thread Aaron Bono
On 9/10/06, Robert Edwards <[EMAIL PROTECTED]> wrote: (this is my first post to this list...)I am wondering if Postgres, and/or SQL in general, has a facility torun a function at connection set-up time (after a successful connectionattempt) and/or at session completion (or disconnect)? I want to pr

[SQL] on connect/on disconnect

2006-09-10 Thread Robert Edwards
(this is my first post to this list...) 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)? I want to pre-populate a table (actually an INSERT rule on a