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

Re: SVN Commit by guillaume: r8145 - in trunk/pgadmin3: . pgadmin/db pgadmin/frm

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: SVN Commit by guillaume: r8145 - in trunk/pgadmin3: . pgadmin/db pgadmin/frm
Date: 2010-01-02 21:57:39
Message-ID: 4B3FC153.9060401@lelarge.info (view raw or flat)
Thread:
Lists: pgadmin-hackers
Le 30/12/2009 18:09, Dave Page a écrit :
> On Wed, Dec 30, 2009 at 1:14 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>>> The application_name should be set as a connection string parameter,
>>> not an explicit SET command.
>>
>> That was the first thing I wanted to do. But people won't be able to use
>> pgAdmin with older PostgreSQL releases if we use the connection string
>> parameter.
> 
> Yes they will. We changed libpq to ensure that works properly.
> 

OK, I finally understood it. Sorry.

>>> This ensures that the application name is
>>> included in the initial connection log message, and avoids a round
>>> trip with the SET query. PQconninfoParse can be used to test if libpq
>>> supports application_name at runtime.
>>>
>>
>> I don't understand that. libpq and the server are two different things.
>> You can have a new libpq on your client and an old server. client's
>> PQconninfoParse will tell you application_name is available, but it
>> could be that the server doesn't understand it. Perhaps I need to get a
>> better look at PQconninfoParse, but don't have the time right now.
> 
> You need an 8.5 libpq to use application_name in the connection
> string. It doesn't matter what server you have, as libpq will ignore
> the parameter for older servers. To ensure you have a suitable libpq,
> prepare the connection string, and feed it to PQconninfoParse. If you
> get a null response, there's a problem (e.g. application_name is not
> supported). If you get a non-null response, the connection string is
> valid.
> 

OK. Here is a new patch which calls PQconninfoParse and acts according
to its return code. It also removes part of the old patch.

Is it better?

>>> I suspect the patch is also missing some changes to the debugger.
>>>
>>
>> Probably, I'll look at this.
>>

Done too.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Attachment: ticket116_v3.patch
Description: text/x-patch (25.9 KB)

In response to

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2010-01-03 09:55:05
Subject: Re: SVN Commit by guillaume: r8145 - in trunk/pgadmin3: . pgadmin/db pgadmin/frm
Previous:From: pgAdmin TracDate: 2010-01-02 14:44:15
Subject: Re: [pgAdmin III] #122: storenode function takes only two parameters with Slony 2.0

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