OIDs, CTIDs, updateable cursors and friends

From: Shachar Shemesh <psql(at)shemesh(dot)biz>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL OLE DB development <oledb-dev(at)gborg(dot)postgresql(dot)org>
Subject: OIDs, CTIDs, updateable cursors and friends
Date: 2004-02-18 13:17:34
Message-ID: 403365EE.8010701@shemesh.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I'm in the process of writing an OLE DB provider for postgres. I am,
right now, at the point where updating an entry becomes an issue.
Ideally, I would open an updateable cursor for a table/view, and use
that. Unfortunetly, Postgres doesn't seem to support those at all.

As an alternative, I was thinking of using some unique field to
identify, with certanity, the line in question. This will allow me to
use an "update" command to modify said line, in case there is a need
with the OLE DB client. My quetion is this - what can I use?

I have tried to find some docs regarding OIDs and CTIDs, but the docs
seem scarce. If I understand this correctly - OID is meant to identify a
row in a table, though it is not guarenteed to be unique across tables,
or even inside a given table. A CTID is meant to identify the physical
location at which a row is stored. Are these correct?

Would adding "OID" to the rows returned by each "Select" call, and then
doing "update blah where oid=xxx" when I'm requested to update the row
sound like a reasonable stategy, in lieu of updateable cursors? Can
anyone suggest a better way?

Shachar

--
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2004-02-18 13:40:01 Re: OIDs, CTIDs, updateable cursors and friends
Previous Message Andrew Dunstan 2004-02-18 11:03:34 Re: log_line_info plan