Thread: PGAdminIII 1.4.1 bug in view_data - getting wrong PK.

PGAdminIII 1.4.1 bug in view_data - getting wrong PK.

From
Scott Chapman
Date:
View Data is not getting the correct primary key in pgAdminIII 1.4.1
I have a table shown below which shows it correctly.
When I got "view data", the [PK] shows up on the last column, not the correct
one and deletes fail.


CREATE TABLE users
(
   email text NOT NULL,
   "password" text NOT NULL,
   first_name text NOT NULL,
   last_name text NOT NULL,
   company text,
   address1 text NOT NULL,
   address2 text,
   city text NOT NULL,
   state text NOT NULL,
   zip text NOT NULL,
   phone1 text NOT NULL,
   phone2 text,
   phonefax text,
   weburl text,
   services text[],
   products text[],
   native_percent text,
   ecosystem_specialization text[],
   sales_types text[],
   payment_types text[],
   shipping_methods text[],
   notes text,
   track_provenance text,
   user_id bigserial NOT NULL,
   job_title text,
   region_specialization text[],
   CONSTRAINT users_new_pkey PRIMARY KEY (user_id),
   CONSTRAINT users_email_key UNIQUE (email)
)
WITHOUT OIDS;
ALTER TABLE users OWNER TO root;


Re: PGAdminIII 1.4.1 bug in view_data - getting wrong PK.

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Scott Chapman
> Sent: 11 January 2006 15:30
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] PGAdminIII 1.4.1 bug in view_data
> - getting wrong PK.
>
> View Data is not getting the correct primary key in pgAdminIII 1.4.1
> I have a table shown below which shows it correctly.
> When I got "view data", the [PK] shows up on the last column,
> not the correct
> one and deletes fail.

Hi,

Andreas has already fixed this for 1.4.2:

2005-12-26 AP  1.4.2  Fix PK detection in EditGrid per Andrus Moor

I've checked your test case and it does work fine.

Thanks for the report though.

Regards, Dave