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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 29 Aug 2006 10:47:06 -0400
  • Message-id: <7CB29706-A6BE-4DDF-90DC-2FA4850A92D8(at)khera(dot)org>

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!

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group