> Brook Milligan wrote:
> > 
> >            [jeroen@rulgfu sql]$ psql -f test.sql
> >            insert into testfile values (lo_import('test.sql'));
> >            ERROR:  be_lo_import: can't open unix file"test.sql"
> > 
> > Isn't the problem that the backend expects test.sql to be in the data
> > directories somewhere?  Try a full path.
> 
> Good guess. Nevertheless, didn't work.
> 
> Jeroen
> 
> 

Try this patch.


---------------------------------------------------------------------------

Tatsuo Ishii
[EMAIL PROTECTED]
---------------------------------------------------------------------------
*** postgresql-v6.4/src/backend/storage/large_object/inv_api.c~ Thu Nov  5 17:48:26 
1998
--- postgresql-v6.4/src/backend/storage/large_object/inv_api.c  Thu Nov 12 15:52:59 
1998
***************
*** 549,556 ****
                                tuplen = inv_wrnew(obj_desc, buf, nbytes - nwritten);
                        else
                                tuplen = inv_wrold(obj_desc, buf, nbytes - nwritten, 
tuple, buffer);
                }
!               ReleaseBuffer(buffer);
  
                /* move pointers past the amount we just wrote */
                buf += tuplen;
--- 549,557 ----
                                tuplen = inv_wrnew(obj_desc, buf, nbytes - nwritten);
                        else
                                tuplen = inv_wrold(obj_desc, buf, nbytes - nwritten, 
tuple, buffer);
+                       ReleaseBuffer(buffer);
                }
! 
  
                /* move pointers past the amount we just wrote */
                buf += tuplen;



-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  [EMAIL PROTECTED]            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Reply via email to