Search Postgresql Archives

Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 8, 2009 at 9:08 PM, Tim Uckun <timuckun@xxxxxxxxx> wrote:
>> I suspect you are expecting that the map will cause root to be
>> logged in as postgres without asking for that.  It won't.
>> What it will do is allow "psql -U postgres" and similar to work.
>
> That's exactly what I am looking to do. In my case I have a script
> that runs as root. I want to log in as postgres user from that script
> but the script is running as root.
>
> The way I have it set up doesn't permit that. I want to know what I
> need to do in order to make that happen.

then say you're postgres in the script with the -U (if you're using psql)

AS ROOT:
psql -U postgres -h remote_db dbname

Note that ident doesn't work so well between machines, so you might
want to look at .pgpass

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux