OIDs, CTIDs, updateable cursors and friends

Поиск
Список
Период
Сортировка
От Shachar Shemesh
Тема OIDs, CTIDs, updateable cursors and friends
Дата
Msg-id 403365EE.8010701@shemesh.biz
обсуждение исходный текст
Ответы Re: OIDs, CTIDs, updateable cursors and friends  (Greg Stark <gsstark@mit.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: log_line_info plan
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: OIDs, CTIDs, updateable cursors and friends