Skip site navigation (1) Skip section navigation (2)

Re: on connect/on disconnect

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: on connect/on disconnect
Date: 2006-09-11 10:36:59
Message-ID: 45053C4B.5010208@logix-tt.com (view raw or flat)
Thread:
Lists: pgsql-sql
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 <user>;

pg_dump uses this frequently. See the docs for more details.
http://www.postgresql.org/docs/8.1/interactive/sql-set-session-authorization.html

HTH,
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

In response to

pgsql-sql by date

Next:From: James CloosDate: 2006-09-11 12:04:59
Subject: Re: where clause subqueries vs multiple rows results
Previous:From: Markus SchaberDate: 2006-09-11 10:31:43
Subject: Re: on connect/on disconnect

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group