Re: Fix for a problem with auto reconnection

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Christoph Zwerschke <cito(at)online(dot)de>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Fix for a problem with auto reconnection
Date: 2014-06-27 12:20:30
Message-ID: CA+OCxoyPwXBa9AqtH6kbh3B=4KWpdXB9y+STzkiCggo0jHCNdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, Jun 27, 2014 at 9:58 AM, Christoph Zwerschke <cito(at)online(dot)de> wrote:
> Am 27.06.2014 09:57, schrieb Dave Page:
>
>> Ashesh - your thoughts on this? I'm not sure I see how resetting
>> needColQuoting would prevent a datlastsysoid error, though I admit I
>> haven't had a chance to dive into the code yet.
>
>
> Some more detail:
>
> The error happens in line 285 of pgadmin/db/pgConn.cpp:
>
> if (set->ColNumber(wxT("\"datlastsysoid\"")) >= 0)
> needColQuoting = true;
>
> This assumes that needColQuoting was set to false before. Another solution
> might be to modify that check to something like this:
>
> if (!needColQuoting &&
> set->ColNumber(wxT("\"datlastsysoid\"")) >= 0)
> needColQuoting = true;

Huh, that a kinda weird way of doing things. I think in the longer
term we should consider refactoring the handling of that variable
entirely.

In any case, I've committed a fix now, doing what your first suggested
(we do that elsewhere it seems).

Thanks!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Emanuele Sottocorno 2014-06-29 12:24:11 Character[] field value are truncated
Previous Message Dave Page 2014-06-27 12:18:59 pgAdmin III commit: Ensure that needColQuoting is reset to false when r