Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
От | Tom Lane |
---|---|
Тема | Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error |
Дата | |
Msg-id | 5019.905956199@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error (Sebastian Meyer <meyer@mevis.de>) |
Список | 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 по дате отправления: