From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-interfaces@postgreSQL.org
Cc: Midwest Online <mo@midwestonline.com>
Subject: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
Date: Wed, 16 Sep 1998 10:29:59 -0400
Message-ID: <5019.905956199@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.SGI.4.02.9809161001300.18985-100000@forte>
Sebastian Meyer <meyer@mevis.de> writes:
> On Wed, 16 Sep 1998, Torsten Neuer wrote:
>> Clint wrote:
>>>> I think you're right, Tom. If I run the program on my Linux box as a
>>>> different user, I get the same error. Now, how do I set the username
>>>> from C/C++?? I can't figure it out from the docs ...
> Its in http://www.PostgreSQL.ORG/docs/postgres/libpq9374.htm
> Read the section on "PQsetdbLogin - Makes a new connection to a backend"
Ah, but Clint's real problem is that he's not calling libpq directly,
but via libpq++. And as far as I can see, libpq++ doesn't have any way
to open a connection except by calling plain old PQsetdb. This needs to
be fixed. (We should add an entry point to libpq++ that corresponds to
PQconnectdb, so that the connection parameters are passed through as a
single string and libpq++ doesn't have to know about each and every one
of 'em.)
The short-term workaround is what you mention next:
> It's so easy... If you should want to set environment variables anyway:
> environ(5), getenv(3) and putenv(3) tell you how.
Setting PGUSER (and PGPASSWORD if needed) env. variables will provide a
way to pass these items to libpq despite the lack of any cooperation
from libpq++.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, mo@midwestonline.com
Subject: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
In-Reply-To: <5019.905956199@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox