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 yo

[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 alternativ

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 hol

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 ct

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

2004-02-18 Thread Tom Lane
"Dave Page" <[EMAIL PROTECTED]> writes: > Ignoring potential OID wraparound problems (which we do in pgAdmin) this > should work, assuming there is an OID column. I would suggest trying the > following methods in sequence: > 1) Use the tables primary key. > 2) Use the OID (and check that only one

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

2004-02-18 Thread Brett Schwarz
> > Ok, it seems to me there are several options here. > > 1. Find out which is the primary key for the > table. What > > happens if the primary key is a multi-row thing? > What happens > > if there is no primary key? > > I guess you mean multicolumn? No different, you just > need all columns i

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

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 qu

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&#x

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 &quo

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 returne