From: | Ben Chobot <bench(at)silentmedia(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pgpass (in)flexibility |
Date: | 2015-09-15 05:48:48 |
Message-ID: | FF2C2472-6200-4052-B7CB-2D1C75272AD4@silentmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We're in a situation where we would like to take advantage of the pgpass hostname field to determine which password gets used. For example:
psql -h prod-server -d foo # should use the prod password
psql -h beta-server -d foo # should use the beta password
This would *seem* to be simple, just put "prod-server" or "beta-server" into the hostname field of .pgpass. But if somebody uses the FQDN of those hosts, then the line does not match. If somebody uses the IP address of those hosts, again, no match. It seems that the hostname must match the hostname *exactly* - or match any host ("*"), which does not work for our use case.
This seems to make the hostname field unnecessarily inflexible. Has anybody else experienced - and hopefully overcome - this pain? Maybe I'm just going about it all wrong.
From | Date | Subject | |
---|---|---|---|
Next Message | Biswadeep Banerjee | 2015-09-15 06:33:27 | Re: [BUGS] BUG #13619: regression functions return Null |
Previous Message | Melvin Davidson | 2015-09-15 01:02:53 | Re: clone_schema function |