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

Re: pgadmin2 1.4.12 edit record- update record

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Alex Balan" <abalan(at)telus(dot)net>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgadmin2 1.4.12 edit record- update record
Date: 2003-01-17 08:47:25
Message-ID: 03AF4E498C591348A42FC93DEA9661B8259ABD@mail.vale-housing.co.uk (view raw or flat)
Thread:
Lists: 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(at)telus(dot)net] 
	Sent: 16 January 2003 20:48
	To: pgadmin-hackers(at)postgresql(dot)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

Next:From: frank_lupoDate: 2003-01-22 10:03:54
Subject: problem to connect 7.3
Previous:From: Alex BalanDate: 2003-01-16 20:48:03
Subject: pgadmin2 1.4.12 edit record- update record

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