Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-interfaces(at)postgreSQL(dot)org
Cc: Midwest Online <mo(at)midwestonline(dot)com>
Subject: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
Date: 1998-09-16 14:29:59
Message-ID: 5019.905956199@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Sebastian Meyer <meyer(at)mevis(dot)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

Responses

pgsql-interfaces by date

Next:From: Thomas G. LockhartDate: 1998-09-16 16:05:46
Subject: Re: Integrated Source
Previous:From: LifeDate: 1998-09-16 13:45:39
Subject:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group