Re: Problem with insert - 1.12.0 RC1

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Erwin Brandstetter <brsaweda(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Problem with insert - 1.12.0 RC1
Date: 2010-09-02 08:16:09
Message-ID: 4C7F5D49.7080404@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Le 02/09/2010 03:10, Erwin Brandstetter a écrit :
> On 02.09.2010 01:14, Guillaume Lelarge wrote:
>> Le 02/09/2010 00:41, Erwin Brandstetter a écrit :
>>> On Aug 31, 7:19 pm,sid(dot)the(dot)technic(dot)(dot)(dot)(at)gmail(dot)com (Sid) wrote:
>>>> Hi,
>>>>
>>>> ~~~~~~~~~~~~~~~~~~~~~~~
>>>> Local installation:
>>>> Windows 7 / Polish
>>>> PgAdmin III: V. 1.12.0 RC1
>>>> PostgreSQL: 8.4.4
>>>> ~~~~~~~~~~~~~~~~~~~~~~~
>>>>
>>>> Table should have some constraints (not null for instance) .
>>>> Open table to edit rows.
>>>> Put a value into any field and try to move from a row (now I assume
>>>> that
>>>> field with constraint have some wrong value, null in this case).
>>>> In previous versions PgAdmin shows error message and returns to edit
>>>> mode.
>>>> In 1.12 it stays in some weird state and all values are lost.
>>>>
>>>> I reported this bug onpgadmin-supp(dot)(dot)(dot)(at)postgresql(dot)org (on 1.12
>>>> beta4) but
>>>> there was no response.
>>>> Can anyone just confirm if it is a bug or I am doing something wrong.
>>> I can confirm the problem for v1.12RC1 and v1.12beta4. I found it just
>>> yesterday but did not have the time to report. All values of a row
>>> vanish after running into an error on save.
>>> The problem is not present in v1.10.5, where the you can keep editing
>>> the row.
>>> It is also noteworthy that it only happens with INSERTs. UPDATEs that
>>> run into an error are not affected.
>> You mean it feels like it added an empty line, right? if this is it, I
>> can reproduce it. Unfortunately, I didn't find any differences in the
>> source code between 1.10 and 1.12 that would have this behaviour. If you
>> confirm me this is the bug you've found, I'll take a deeper look at this.
>
> Yeah, that's exactly what it looks like after pressing 'ok' on the error
> msg.: all fields go empty.
> Do you want me to create a ticket on trac?
>

Nope, but thanks :)

I think the issue was added with this commit:

http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commit;h=6b3b661244455951fccbed7895aa22fa7c2ed2a2

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?

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2010-09-02 08:17:19 Re: Fwd: Editing date values in frmEditGrid
Previous Message Erwin Brandstetter 2010-09-02 01:10:18 Re: Problem with insert - 1.12.0 RC1