Hi all,

When I try to open (using MFC) a non-forward only cursor on a view (i.e. 
- select * from viewname), I get an error of "attribute ctid not found". 
There are some chances that this is an ODBC problem, but my research 
suggests that the dependancy on ctid is created by the database itself.

Can anyone comment about this? Is this problem solveable?

          Shachar

-- 
Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/



Sun, 17 Aug 2003 19:55:00 +0300
Shachar Shemesh <psql@shemesh.biz>
bidirectional cursors on views
Shachar Shemesh <psql@shemesh.biz> writes:
> When I try to open (using MFC) a non-forward only cursor on a view (i.e. 
> - select * from viewname), I get an error of "attribute ctid not found". 
> There are some chances that this is an ODBC problem, but my research 
> suggests that the dependancy on ctid is created by the database itself.

Your research is faulty --- it's an ODBC issue.

> Can anyone comment about this? Is this problem solveable?

You'd have better luck asking on pgsql-odbc, but my guess is that they
depend on ctid as a (crude) form of unique row identification.

			regards, tom lane

Sun, 17 Aug 2003 14:56:59 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: bidirectional cursors on views 
Tom Lane wrote:

>Shachar Shemesh <psql@shemesh.biz> writes:
>  
>
>>When I try to open (using MFC) a non-forward only cursor on a view (i.e. 
>>- select * from viewname), I get an error of "attribute ctid not found". 
>>There are some chances that this is an ODBC problem, but my research 
>>suggests that the dependancy on ctid is created by the database itself.
>>    
>>
>
>Your research is faulty --- it's an ODBC issue.
>  
>
Am I to understand that psql's nativ cursors support bidirectional 
movements on views? That is good news, actually.

>>Can anyone comment about this? Is this problem solveable?
>>    
>>
>
>You'd have better luck asking on pgsql-odbc, but my guess is that they
>depend on ctid as a (crude) form of unique row identification.
>
That was my guess as well. I did ask at pgsql-odbc on Wendsday. When 
noone answered, I did the open source thing and tried to singstep the 
code. Thing is - I placed a breakpoint on all occurances of "ctid" in 
the ODBC driver's code, and none of those breakpoints were hit when the 
query that didn't go through was sent. That's the reason I arrived at 
the conclusion I did.

If you can tell me for sure that such cursors are, in fact, supported by 
pgsql itself, then I'll go back to the odbc sources and, if necessary, 
implement this (not happy about those prospects - I don't know ODBC 
worth of manure).

>			regards, tom lane
>  
>
Many thanks,

             Shachar

-- 
Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/



Sun, 17 Aug 2003 22:28:31 +0300
Shachar Shemesh <psql@shemesh.biz>
Re: bidirectional cursors on views
Shachar Shemesh <psql@shemesh.biz> writes:
> Am I to understand that psql's nativ cursors support bidirectional 
> movements on views? That is good news, actually.

They do.  (Complex views, like joins, may not work real well before
7.4.)

I suspect your real difficulty is that a view will not expose the ctid
column of the underlying table (if any).

			regards, tom lane

Sun, 17 Aug 2003 19:50:35 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: bidirectional cursors on views 