Thread: Possible Bug in "View data for selected object" screen

Possible Bug in "View data for selected object" screen

From
Stijn Vanroye
Date:
Hello,

I am experiencing the following (reproducable) error in pgAdmin. I'm
posting this as information. If this bug is already known, my apologies.

I'm running pgAdmin version 1.4.3 (which is the latest stable I
presume), Language English, downloaded the win32 zip file.
OS: Win XP Pro SP2 Dutch with all latest updates
Postgres backend Version: 8.1.4 for Win32

Unfortunatly I do not have the luxury to download and test with the
latest beta or development snapshot.

This is the error description:

I do the following:
- open the "View data for selected object" screen for a table with an
autoinc field as PK (fieldtype serial in combination whit a sequence)
- edit some data (not the PK field)
- perform an action that would confirm the changes (selecting different
record, pressing enter key,...)

pgAdmin closes entirely without an error message, other than the windows
"report this behaviour" screen, which is shown 3 times.

I hope this helps in some way for the development. If additional
information is needed (screenshots or something), I'll be glad to provide.


Kind Regards,

Stijn.



Re: Possible Bug in "View data for selected

From
Dave Page
Date:


On 1/9/06 12:23, "Stijn Vanroye" <s.vanroye@easytowork.nl> wrote:

> Hello,
>
> I am experiencing the following (reproducable) error in pgAdmin. I'm
> posting this as information. If this bug is already known, my apologies.
>
> I'm running pgAdmin version 1.4.3 (which is the latest stable I
> presume), Language English, downloaded the win32 zip file.
> OS: Win XP Pro SP2 Dutch with all latest updates
> Postgres backend Version: 8.1.4 for Win32
>
> Unfortunatly I do not have the luxury to download and test with the
> latest beta or development snapshot.
>
> This is the error description:
>
> I do the following:
> - open the "View data for selected object" screen for a table with an
> autoinc field as PK (fieldtype serial in combination whit a sequence)
> - edit some data (not the PK field)
> - perform an action that would confirm the changes (selecting different
> record, pressing enter key,...)
>
> pgAdmin closes entirely without an error message, other than the windows
> "report this behaviour" screen, which is shown 3 times.

That's definitely not normal - I know lot's of people use it exactly thaat
way on a regular basis, myself included. So, the question is; what's odd
about your setup?

Some thoughts:

- Does this happen on every table or just one?

- What encoding are you using?

- What does the table definition look like?

Regards, Dave.


Re: Possible Bug in "View data for selected

From
Stijn Vanroye
Date:
Dave Page schreef:
> Some thoughts:
>
> - Does this happen on every table or just one?
It only seems to happen on tables where I have the PK of type serial and
I have a sequence on it. Other tables where this isn't the case, seem to
work ok.
My colleague has the same problem on another workstation. His
workstation also runs on WinXP Pro Dutch though. We both connect to the
same back-end. I'm not sure if maybe there is a problem with the
backend, but in any case pgAdmin should just close without a descent
error message I think ;-)

We are going to try and upgrade our backend to the latest version of PG
sometime in the near future.


> - What encoding are you using?
UTF8

> - What does the table definition look like?
One of the tables:

CREATE TABLE casemanager
(
   naam varchar(50),
   telefoon varchar(15),
   mobiel varchar(15),
   email varchar(50),
   casemanager_id serial NOT NULL,
   CONSTRAINT pk_casemanager_id PRIMARY KEY (casemanager_id)
)
WITHOUT OIDS;
ALTER TABLE casemanager OWNER TO someuser;

The sequence that goes along with it:

CREATE SEQUENCE casemanager_casemanager_id_seq
   INCREMENT 1
   MINVALUE 1
   MAXVALUE 9223372036854775807
   START 19
   CACHE 1;
ALTER TABLE casemanager_casemanager_id_seq OWNER TO postgres;


I this info is of any use to you.


Regards,

Stijn.

Re: Possible Bug in "View data for selected

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Stijn Vanroye
> Sent: 04 September 2006 08:15
> To: Dave Page; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Possible Bug in "View data for selected
>
> CREATE TABLE casemanager
> (
>    naam varchar(50),
>    telefoon varchar(15),
>    mobiel varchar(15),
>    email varchar(50),
>    casemanager_id serial NOT NULL,
>    CONSTRAINT pk_casemanager_id PRIMARY KEY (casemanager_id)
> )
> WITHOUT OIDS;
> ALTER TABLE casemanager OWNER TO someuser;

I cannot reproduce any failures with this table in SVN trunk code. If
you recreate an empty copy of the table (with a different name, or in a
different DB), does that work as expected?

Regards. Dave

Re: Possible Bug in "View data for selected

From
Stijn Vanroye
Date:
Dave Page schreef:
>
>
>> -----Original Message-----
>> From: pgadmin-hackers-owner@postgresql.org
>> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
>> Stijn Vanroye
>> Sent: 04 September 2006 08:15
>> To: Dave Page; pgadmin-hackers@postgresql.org
>> Subject: Re: [pgadmin-hackers] Possible Bug in "View data for selected
>>
>> CREATE TABLE casemanager
>> (
>>    naam varchar(50),
>>    telefoon varchar(15),
>>    mobiel varchar(15),
>>    email varchar(50),
>>    casemanager_id serial NOT NULL,
>>    CONSTRAINT pk_casemanager_id PRIMARY KEY (casemanager_id)
>> )
>> WITHOUT OIDS;
>> ALTER TABLE casemanager OWNER TO someuser;
>
> I cannot reproduce any failures with this table in SVN trunk code. If
> you recreate an empty copy of the table (with a different name, or in a
> different DB), does that work as expected?

Indeed, if I recreate the table in a different database everything works
OK. Strange...
The casemanager_id field first was a normal int4 field, but is later
dropped and made again as a serial field. That's the only strange thing
that happend.
No Foreign keys are declared, just 4 simple tables with 1 id of type
serial each.

I think that I'll recreate the entire and insert the data again. I think
that's the easiest way to solve the problem for me. If you wich to
persue this a bit further though, let me know I'll be honored to help. I
don't know if there are any usefull logs I can enable or something.

Regards,

Stijn.

Re: Possible Bug in "View data for selected

From
"Dave Page"
Date:


-----Original Message-----
From: pgadmin-hackers-owner@postgresql.org on behalf of Stijn Vanroye
Sent: Mon 9/4/2006 4:47 PM
To: pgadmin-hackers@postgresql.org
Subject: Re: [pgadmin-hackers] Possible Bug in "View data for selected

> I think that I'll recreate the entire and insert the data again. I think
> that's the easiest way to solve the problem for me. If you wich to
> persue this a bit further though, let me know I'll be honored to help. I
> don't know if there are any usefull logs I can enable or something.

I'm not sure there is much you could do unless you have Visual Studio and want to run it through the debugger for me!!

I'll have a play around with changing pkey defaults as you've done though and see if I can come up with anything.

Thanks, Dave.

Re: Possible Bug in "View data for selected

From
Stijn Vanroye
Date:
Dave Page schreef:
 >
 >
 > -----Original Message-----
 > From: pgadmin-hackers-owner@postgresql.org on behalf of Stijn Vanroye
 > Sent: Mon 9/4/2006 4:47 PM
 > To: pgadmin-hackers@postgresql.org
 > Subject: Re: [pgadmin-hackers] Possible Bug in "View data for selected
 >
 >> I think that I'll recreate the entire and insert the data again. I
think
 >> that's the easiest way to solve the problem for me. If you wich to
 >> persue this a bit further though, let me know I'll be honored to
help. I
 >> don't know if there are any usefull logs I can enable or something.
 >
 > I'm not sure there is much you could do unless you have Visual Studio
and want to run it through the debugger for me!!
 >
 > I'll have a play around with changing pkey defaults as you've done
though and see if I can come up with anything.
 >
First off, excuse me for the late reply (I was out of office for a few
days).
Unfortunatly I don't have Visual Studio (we develop with Delphi ;-) ),
so I can't much help with debugging. I will however keep you informed
should I figure out what exactly seems to be triggering the effect, or
descover any logic in it.
If you need some info, drop me a mail.

Regards, Stijn.