Thread: pgAdmin data grid editing date or time values

pgAdmin data grid editing date or time values

From
"Paul Hughes"
Date:
Hi,

I'm running pgAdmin1.12.0 beta (on XP Pro SP3) against PostgreSQL 9.0 beta 1
server (on Vista Business Server).

Pressing the Delete key in the edit grid with a date or time field value
selected always causes pgAdmin to crash.

To reproduce, run the following script:

DROP TABLE IF EXISTS test_me;
CREATE TABLE test_me
( jobid integer NOT NULL, jobdate date NOT NULL, starttime time without time zone NOT NULL, CONSTRAINT "ixjobid"
PRIMARYKEY (jobid)
 
);
INSERT INTO test_me(jobid, jobdate, starttime) VALUES (1, '2010-05-01',
'08:30:00');
INSERT INTO test_me(jobid, jobdate, starttime) VALUES (2, '2010-05-05',
'15:30:00');
INSERT INTO test_me(jobid, jobdate, starttime) VALUES (3, '2010-05-10',
'15:00:00');
INSERT INTO test_me(jobid, jobdate, starttime) VALUES (4, '2010-05-30',
'10:00:00');


Highlight the table in pgAdmin and click the edit grid button.
In the edit gridr, click in one of the date or time cells to highlight the
cell.
Click again to put the highlighted cell into edit mode (so it shows the
current value as selected text).
Press delete (this causes the crash).

I have also encountered random crashes whilst editing date and or time
values without pressing delete but I've been unable to reproduce these
reliably.

Regards, Paul Hughes.




Re: pgAdmin data grid editing date or time values

From
Guillaume Lelarge
Date:
Hi,

Le 18/05/2010 06:34, Paul Hughes a écrit :
> [...]
> I'm running pgAdmin1.12.0 beta (on XP Pro SP3) against PostgreSQL 9.0 beta 1
> server (on Vista Business Server).
> 
> Pressing the Delete key in the edit grid with a date or time field value
> selected always causes pgAdmin to crash.
> 
> To reproduce, run the following script:
> 
> DROP TABLE IF EXISTS test_me;
> CREATE TABLE test_me
> (
>   jobid integer NOT NULL,
>   jobdate date NOT NULL,
>   starttime time without time zone NOT NULL,
>   CONSTRAINT "ixjobid" PRIMARY KEY (jobid)
> );
> INSERT INTO test_me(jobid, jobdate, starttime) VALUES (1, '2010-05-01',
> '08:30:00');
> INSERT INTO test_me(jobid, jobdate, starttime) VALUES (2, '2010-05-05',
> '15:30:00');
> INSERT INTO test_me(jobid, jobdate, starttime) VALUES (3, '2010-05-10',
> '15:00:00');
> INSERT INTO test_me(jobid, jobdate, starttime) VALUES (4, '2010-05-30',
> '10:00:00');
> 
> 
> Highlight the table in pgAdmin and click the edit grid button.
> In the edit gridr, click in one of the date or time cells to highlight the
> cell.
> Click again to put the highlighted cell into edit mode (so it shows the
> current value as selected text).
> Press delete (this causes the crash).
> 
> I have also encountered random crashes whilst editing date and or time
> values without pressing delete but I've been unable to reproduce these
> reliably.
> 

It crashes also on 1.10, with PostgreSQL 8.4. The editor was not created
for date/time columns, so the crash when we tried to access it.

This is now fixed and will be included in 1.10.4 and 1.12.0 beta 2,
whenever they get released.

Thank you for your report.


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