Обсуждение: update using OID instead of PKEY?
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!
> -----Original Message----- > From: pgadmin-support-owner@postgresql.org > [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Vivek Khera > Sent: 29 August 2006 15:47 > To: pgadmin-support@postgresql.org > Subject: [pgadmin-support] update using OID instead of PKEY? > > 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. Thanks - I've reversed it to favour a PKEY over oids when present. This change will appear in 1.6. Regards, Dave.
On Aug 30, 2006, at 8:55 AM, Dave Page wrote: >> 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. > > Thanks - I've reversed it to favour a PKEY over oids when present. > This > change will appear in 1.6. Awesome... is there some nightly build for windows that might have this improvement? Thanks.
> -----Original Message----- > From: Vivek Khera [mailto:vivek@khera.org] > Sent: 30 August 2006 15:36 > To: Dave Page > Cc: pgadmin-support@postgresql.org > Subject: Re: [pgadmin-support] update using OID instead of PKEY? > > > On Aug 30, 2006, at 8:55 AM, Dave Page wrote: > > >> 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. > > > > Thanks - I've reversed it to favour a PKEY over oids when present. > > This > > change will appear in 1.6. > > Awesome... is there some nightly build for windows that might have > this improvement? I've uploaded a build to http://developer.pgadmin.org/snapshots/win32/ Regards, Dave.