Re: Large objects

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Large objects
Дата
Msg-id 20000615145339X.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на Large objects  (Luis Martins <kalium@usa.net>)
Список pgsql-general
>  Hi everyone, I have to insert a few PDF files into my database, and I
> am not able to do it ...
>   I have to use PHP3, and all I could do was use the lo_import, but in
> this case, I am not able to insert any data because I am not an
> administrator. Is there any other way of doing it, using, let's say,
> pg_locreate, pg_loopen, or something like that ?
>   Thanx in advance.

Of course you can. The essential part of the program should look like:

  pg_exec($con,"begin");
  $oid = pg_locreate($con);
  $lobj = pg_loopen($con,$oid,"w");
  /* read your PDF file contents into $img variable */
  pg_lowrite($lobj,$img);
  pg_loclose($lobj);
  pg_exec($con,"end");
--
Tatsuo Ishii

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

Предыдущее
От: Marc Britten
Дата:
Сообщение: trigger errors
Следующее
От: Paulo Jan
Дата:
Сообщение: Re: "Tuple is too big"