Re: current_user changes immediately after login - Mailing list pgsql-general

From Christian Schröder
Subject Re: current_user changes immediately after login
Date
Msg-id 47297428.7030709@deriva.de
Whole thread Raw
In response to Re: current_user changes immediately after login  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> =?ISO-8859-1?Q?Christian_Schr=F6der?= <cs@deriva.de> writes:
>
>> I have a strange problem: When I connect to one of my databases, the
>> current_user immediatly changes without any interaction from my side.
>>
>
> That's bizarre.  Do you have anything in ~/.psqlrc?  I'm also wondering
> (though too lazy to experiment) whether this effect could be produced
> via "ALTER DATABASE foo SET role = bar" ... checking
> pg_database.datconfig would be enough to eliminate that idea ...
>

I had found the problem just before I read your mail and you are
perfectly right with your guess: These are the corresponding entries
from the pg_database system catalog (without the datacl column):

  datname |    datconfig
---------+----------------
  testdb  | {role=itstaff}

So it seems that one of the users (one with the appropriate permissions
for this database) has issued this "alter database" command (probably
without really understanding what he did *g*).
After "alter database testdb reset role" everything is ok now.

Thanks for your help!

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: Ow Mun Heng
Date:
Subject: Re: Search path in group_roles not honered for logins
Next
From: "A. Kretschmer"
Date:
Subject: Re: how can I shut off "more"?