Re: pgadmin2 1.4.12 edit record- update record - Mailing list pgadmin-hackers

From Dave Page
Subject Re: pgadmin2 1.4.12 edit record- update record
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B8259ABD@mail.vale-housing.co.uk
Whole thread Raw
In response to pgadmin2 1.4.12 edit record- update record  ("Alex Balan" <abalan@telus.net>)
List pgadmin-hackers
Hi Alex,
 
This is a known problem which is not the easiest to fix. In pgAdmin 1.2, whe updating rows it built an SQL query based on virtually all columns in the row. This often failed because of things like timezone differences or floating point errors. In pgAdmin 1.4, it will now use a primary key if one is available which greatly reduces the chance of error, however it doesn't handle multipart primary keys :-(
 
This is on my todo list, but I can't say when I will get to it...
 
Regards, Dave.
 
 
-----Original Message-----
From: Alex Balan [mailto:abalan@telus.net]
Sent: 16 January 2003 20:48
To: pgadmin-hackers@postgresql.org
Subject: [pgadmin-hackers] pgadmin2 1.4.12 edit record- update record
Importance: High

Hi there,
 
Heare is an issue I found with pgadmin2 ver 1.4.0 and 1.4.12 which is NOT in ver 1.2
 
Have a table (structure is at the end of this mail).
My key is:
 
CONSTRAINT inventoryindex UNIQUE (warehouse_code, serial_number, id),
CONSTRAINT inventory_key PRIMARY KEY (warehouse_code, serial_number, id),
 
(id is an autonumber, serial_number is unique regardless of warehouse_code so the whole key is unique.)

A select statement (on  serial_number=....) returns ONE record - in both ver 1.4.x and 1.2.x

Click Edit, change anything and try to save
     ver 1.2.x SAVES,
    ver 1.4.x returns warning:
"The selected record could not be uniquely identified. 7782 records match and will all be updated if you proceed. Do you ..."
 
I went back to ver 1.2.x for now, just to be on the safe side...
 
If you want more details please feel free to email me.
Alex
 
 
 
 

CREATE TABLE inventorymaster (

warehouse_code char(3) NOT NULL,

serial_number varchar(16) NOT NULL,

class_code char(4) NOT NULL,

length int2 NOT NULL,

diameter int2 NOT NULL,

manufactured_date date NOT NULL,

sold_date char(10),

returned_date char(10),

customer_code char(6),

so_number numeric(10, 0),

inumcad numeric(10, 0),

bfm_unit_volume numeric(15, 2),

spothlf numeric(15, 2),

sale_currency char(3),

costrm numeric(15, 2),

costoh numeric(15, 2),

qty numeric(15, 2),

id int4 DEFAULT nextval('id'::text) NOT NULL,

spothwh numeric(15, 2),

spcadwh numeric(15, 2),

inumoth numeric(10, 0),

uom char(6),

bfm numeric(15, 5),

spcadlf numeric(15, 2),

CONSTRAINT inventoryindex UNIQUE (warehouse_code, serial_number, id),

CONSTRAINT inventory_key PRIMARY KEY (warehouse_code, serial_number, id),

CONSTRAINT "<unnamed>" FOREIGN KEY (warehouse_code) REFERENCES warehousemaster (warehouse_code) ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE,

CONSTRAINT "<unnamed>" FOREIGN KEY (class_code) REFERENCES classmaster (class_code) ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE

) WITH OIDS;

pgadmin-hackers by date:

Previous
From: "Reiter (ext_Zip) Christian"
Date:
Subject: buildall.bat problems
Next
From: "frank_lupo"
Date:
Subject: problem to connect 7.3