[HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-06-03 Thread Shachar Shemesh
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

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-06-03 Thread Greg Stark
Shachar Shemesh [EMAIL PROTECTED] writes: 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? If you're in

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-19 Thread Zeugswetter Andreas SB SD
I believe the ODBC driver uses CTID for this sort of problem. CTID is guaranteed to exist and to be fast to access (since it's a physical locator). Against this you have the problem that concurrent updates of the record will move it, leaving your CTID invalid. However, that IIRC the ctid

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-19 Thread Tom Lane
Zeugswetter Andreas SB SD [EMAIL PROTECTED] writes: IIRC the ctid access follows the chain up to the currently valid tuple ? No. I think Hiroshi or someone put in a function you can use to follow the chain, but a simple WHERE ctid = whatever won't do it. In any case, if you're not holding an

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-18 Thread Dave Page
-Original Message- From: Shachar Shemesh [mailto:[EMAIL PROTECTED] Sent: 18 February 2004 13:18 To: Hackers; PostgreSQL OLE DB development Subject: [HACKERS] OIDs, CTIDs, updateable cursors and friends Would adding OID to the rows returned by each Select call, and then doing

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-18 Thread Shachar Shemesh
Dave Page wrote: -Original Message- From: Shachar Shemesh [mailto:[EMAIL PROTECTED] Sent: 18 February 2004 13:18 To: Hackers; PostgreSQL OLE DB development Subject: [HACKERS] OIDs, CTIDs, updateable cursors and friends Would adding OID to the rows returned by each Select call

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-18 Thread Dave Page
-Original Message- From: Shachar Shemesh [mailto:[EMAIL PROTECTED] Sent: 18 February 2004 14:10 To: Dave Page Cc: Hackers; PostgreSQL OLE DB development Subject: Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends I would, except I'm not sure how many queries I would

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-18 Thread Shachar Shemesh
Dave Page wrote: -Original Message- From: Shachar Shemesh [mailto:[EMAIL PROTECTED] Sent: 18 February 2004 14:10 To: Dave Page Cc: Hackers; PostgreSQL OLE DB development Subject: Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends I would, except I'm not sure how many queries

Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends

2004-02-18 Thread Dave Page
-Original Message- From: Shachar Shemesh [mailto:[EMAIL PROTECTED] Sent: 18 February 2004 14:56 To: Dave Page Cc: Hackers; PostgreSQL OLE DB development Subject: Re: [HACKERS] OIDs, CTIDs, updateable cursors and friends I'll have a look at that. How would updateable cursors do