current_user changes immediately after login - Mailing list pgsql-general

From Christian Schröder
Subject current_user changes immediately after login
Date
Msg-id 47290B4A.8010701@deriva.de
Whole thread Raw
Responses Re: current_user changes immediately after login  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi list,
I have a strange problem: When I connect to one of my databases, the
current_user immediatly changes without any interaction from my side.
This is what I do:

chschroe@db1:~> psql -h db2 testdb
Welcome to psql 8.2.5, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

testdb=> select session_user;
 session_user
--------------
 chschroe
(1 row)

testdb=> select current_user;
 current_user
--------------
 itstaff
(1 row)

How can this happen? The consequence of this is that I cannot access the
tables because the role "itstaff" has no privileges. "reset role" does
not have any effect. After "set role none" the current_user is equal to
the session_user and the tables are accessible again.

This problem does only occur with this database. Do you have any
explanation?

Regards,
    Christian

--
Deriva GmbH                         Tel.: +49 551 489500-42
Financial IT and Consulting         Fax:  +49 551 489500-91
Hans-Böckler-Straße 2                  http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer



pgsql-general by date:

Previous
From: Christian Schröder
Date:
Subject: Re: (Never?) Kill Postmaster?
Next
From: "Catalin Marinas"
Date:
Subject: Re: Fragments in tsearch2 headline