tye thanks again for the comments. Originally I wanted to add a lob_read function to DBD::ODBC and started by looking at DBD::Pg for inspiration. My original post was because I thought the code in DBD::Pg (which I was copying) looked wrong. Just to clear things up, the last code I posted here is for DBD::ODBC and not DBD::Pg.
I understand your point on detecting the difference between errors and EOF and in general agree with you but in this case if an error occurs in odbc_st_lob_read it calls DBI's error registration which will lead to a die if RaiseError is in force. On the other hand if RaiseError is disabled you are correct, you cannot tell the difference between an error and EOF so I'll look at that.
Thanks for your helpful comments.
In reply to Re^6: Perl XS - is this code required in DBD::Pg? (errors)
by mje
in thread Perl XS - is this code required in DBD::Pg?
by mje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |