update using OID instead of PKEY?

From: Vivek Khera <vivek(at)khera(dot)org>
To: pgadmin-support(at)postgresql(dot)org
Subject: update using OID instead of PKEY?
Date: 2006-08-29 14:47:06
Message-ID: 7CB29706-A6BE-4DDF-90DC-2FA4850A92D8@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2006-08-30 12:55:34 Re: update using OID instead of PKEY?
Previous Message Dave Page 2006-08-25 19:03:08 Re: Create database/password problem