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

Re: Problem with insert - 1.12.0 RC1

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Erwin Brandstetter <brsaweda(at)gmail(dot)com>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Problem with insert - 1.12.0 RC1
Date: 2010-09-02 08:28:40
Message-ID: AANLkTi=0wjEOHKBGtn_e45oGty9sMuv8Q8pM5XP5P7Gy@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Thu, Sep 2, 2010 at 9:16 AM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> In pgadmin/db/pgConn.cpp, method ExecuteSet, the line "return 0;" is
> replaced with "return new pgSet();". It fouls the frmEditGrid window,
> which thinks it has a valid return, and displays an empty line. I have
> no idea why this was changed. ExecuteSet doesn't seem to be used in the
> rest of the patch. Dave, can you comment on this please? should we
> revert this line to what it was before the patch?

I honestly don't recall what the rationale for the change was. My
*suspicion* is that it was needed to ensure that we get sane behaviour
from all the places that might be calling ExecuteSet in the face of a
failure. Previously, all those objects would break horribly but be
immediately destroyed by the disconnect. Now, they need to survive in
a reasonable state so the connection can be re-established.

My bad for not commenting on it - sometime these things seem so
obvious at the time :-(

Anyway, can the code in the edit grid be modified to detect the empty
pgSet in place of null?

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

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

In response to

Responses

pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2010-09-02 11:30:24
Subject: Re: Problem with insert - 1.12.0 RC1
Previous:From: Guillaume LelargeDate: 2010-09-02 08:17:19
Subject: Re: Fwd: Editing date values in frmEditGrid

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