Hi, I'm trying to get lo size via libpq before starting reading it (postgres server 8.3.5). lo_lseek always returns 4 (actual size is > 1M). I query table with "select photo from employee where id='xxxx'". It returns lo oid integer as expected. Then I use following code to obtain size of the lo object: int lobj_fd = lo_open(conn, lobjId, INV_READ); // returns valid fd, ok