Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
Date
Msg-id 5019.905956199@sss.pgh.pa.us
Whole thread Raw
In response to Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error  (Sebastian Meyer <meyer@mevis.de>)
List pgsql-interfaces
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

pgsql-interfaces by date:

Previous
From: John Francis Schickling
Date:
Subject: [INTERFACES] Compilation failure compiling pgsqlodbc.
Next
From: Marcio Macedo
Date:
Subject: subscribe