[postgis-devel] Mapping users in PostgreSQL
Jorge Arévalo
jorge.arevalo at gmail.com
Sun Nov 8 07:06:01 PST 2009
On Sun, Nov 8, 2009 at 3:10 AM, Tom Lane <tgl at sss.pgh.pa.us> wrote:
> =?UTF-8?Q?Jorge_Ar=C3=A9valo?= <jorge.arevalo at gmail.com> writes:
>> And in pg_ident.conf file:
>> # MAPNAME IDENT-USERNAME PG-USERNAME
>> mymap jorge gis
>
>> "jorge" is my Linux user, and "gis" is my database user.
>
>> But I always get an authentication fail if I try a direct connection
>> with "psql" and my user. The log file doesn't show any error.
>
> You're misunderstanding what identmap does. That line says that OS user
> "jorge" is *allowed* to connect as database user "gis". It doesn't
> magically substitute that username, though, and psql doesn't know any
> better than to send "jorge" as the database username. You could do
> "psql -U gis", or set PGUSER in your environment.
>
> regards, tom lane
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
Many thanks Tom! I've defined PGUSER and PGHOST properly and
everything works. I'll read more carefully the doc.
Best regards,
Jorge
More information about the postgis-devel
mailing list