Re: [HACKERS] connection user

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitry Samersoff <dms(at)wplus(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] connection user
Date: 1999-03-25 15:18:19
Message-ID: 6550.922375099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dmitry Samersoff <dms(at)wplus(dot)net> writes:
> Are it is good idea to add to PQsetdb parameters
> parameter "USER to conect as" ?

Yup. PQsetdb() is deprecated these days --- you should really be
calling PQsetdbLogin() or even better PQconnectdb() instead.

> (Or probably there is other way to specify postgres USER, different from
> pogram euid?)

If you don't provide a user ID parameter, libpq will look first for
an environment variable PGUSER, and failing that use getpwuid(geteuid())
to find out who you are.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-03-25 15:23:16 Re: [HACKERS] Really slow query on 6.4.2
Previous Message Oleg Broytmann 1999-03-25 14:42:53 Locale patch (Greek locale and koi8-to-win1251 tests)