Re: [GENERAL] Failing lo_import on RH 5.1 -- postgresql-6.3.2 (please help-I'm on my knees..)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [GENERAL] Failing lo_import on RH 5.1 -- postgresql-6.3.2 (please help-I'm on my knees..)
Дата
Msg-id 199811131127.GAA06624@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Failing lo_import on RH 5.1 -- postgresql-6.3.2 (please help-I'm on my knees..)  (Jeroen Schaap <jeroen@rulffk.medfac.leidenuniv.nl>)
Список pgsql-general
> 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
t-ishii@sra.co.jp
---------------------------------------------------------------------------
*** 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
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Failing lo_import on RH 5.1 -- postgresql-6.3.2 (please help-I'm on my knees..)
Следующее
От: "Sergei Chernev"
Дата:
Сообщение: RE: [GENERAL] PL/pgSQL