Re: ecpglib use PQconnectdbParams

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: ecpglib use PQconnectdbParams
Дата
Msg-id 1328705221.29869.3.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: ecpglib use PQconnectdbParams  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: ecpglib use PQconnectdbParams  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ecpglib use PQconnectdbParams  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
On mån, 2012-02-06 at 21:11 +0100, Michael Meskes wrote:
> On Fri, Feb 03, 2012 at 01:15:30PM +0100, Christian Ullrich wrote:
> > Shouldn't these be [7]? You can have up to 6 items, plus the terminator.
>
> I take it only keywords have to be [7], right? Committed, thanks for spotting this.
>
> There seems to be one more problem that I haven't had time to tackle yet. With
> this patch the connection regression test (make checktcp) doesn't run through
> anymore because one test connection cannot be made. It spits out the error
> message:
>
> FATAL:  invalid command-line arguments for server process
> HINT:  Try "postgres --help" for more information.
>
> This connection used to work without the patch and besides the error message is
> not really telling in this context.

You can get more information on that with the attached patch, which
might be a useful addition in general.  The problem comes from this:

exec sql connect to unix:postgresql://localhost/connectdb?connect_timeout=14 user connectuser;

and the updated error message is:

ECPGconnect: could not open database: FATAL:  invalid command-line arguments for server process: connect_timeout=14

Because connect_timeout is a separate libpq connection parameter, but
now it's stuck into "options".  It might have worked more or less by
accident before.

It's not clear to me why this only appears on checktcp.  And why we
don't run those tests by default.  That should be clarified, because
there are also other failures in that test that show that it hasn't been
run in a while.


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: xlog location arithmetic
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Can PQstatus() be used by Application to check connection to postgres periodically?