update using OID instead of PKEY? - Mailing list pgadmin-support

From Vivek Khera
Subject update using OID instead of PKEY?
Date
Msg-id 7CB29706-A6BE-4DDF-90DC-2FA4850A92D8@khera.org
Whole thread Raw
Responses Re: update using OID instead of PKEY?  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgadmin-support
We're observing that updates issued by the tabular view of a table  
use OID instead of the PKEY when the table has OIDs.  Using pgAdmin3  
version 1.4.2.

Specifically this is what we do:

Connect to a DB, drill down and select a table.  Select the "apply  
filter and view data" icon and select a row based on the PKEY.  On  
the resulting tabular view, alter one piece of data then commit it.  
The query run on the DB server does the update "where oid=NNN"  
instead of updating using the primary key like "where user_id=NNN".   
Now, on a 60+ million row table which does not have an index on oid,  
this obviously takes a long time...

On a table without oid's, it uses the PKEY as one would expect.

Is there some way to force pgAdmin to use the PKEY instead?  It seems  
like a bad decision to ever use the OID when a PKEY exists, given  
that the latter is guaranteed to have an index whereas the OID most  
likely will not, given that they are somewhat deprecated.

Thanks!


pgadmin-support by date:

Previous
From: "Alexander Kirpa"
Date:
Subject: Maintenance PK bug
Next
From: "Dave Page"
Date:
Subject: Re: update using OID instead of PKEY?