OIDs, CTIDs, updateable cursors and friends - Mailing list pgsql-hackers

From Shachar Shemesh
Subject OIDs, CTIDs, updateable cursors and friends
Date
Msg-id 403365EE.8010701@shemesh.biz
Whole thread Raw
Responses Re: OIDs, CTIDs, updateable cursors and friends
List 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/



pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: log_line_info plan
Next
From: "Dave Page"
Date:
Subject: Re: OIDs, CTIDs, updateable cursors and friends