Re:

Поиск
Список
Период
Сортировка
От Eric G. Miller
Тема Re:
Дата
Msg-id 20010224001115.A4731@calico.local
обсуждение исходный текст
Ответ на ...  (akif noor <akifnoor@yahoo.com>)
Список pgsql-general
On Fri, Feb 23, 2001 at 04:28:40AM -0800, akif noor wrote:
>
> i have created a table having blob object but now i am
>  not able to insert a picture into the table. Can you
> send me sql command to insert picture into the table i
> need syntax. i tried through DB2IMAGE but failed to
> insert.
>
> if there is any other method of putting image in the
> table, kindly send me the same
> Akif noor

Programmer's Guide::Large Objects::Built in registered functions

                                                                                                           Built in
registeredfunctions
        There are two built-in registered functions, lo_import and lo_export which       are convenient for use in SQL
queries.Here is an example of their use
        CREATE TABLE image (                                                                 name            text,
                                                     raster          oid
         );
                                                  INSERT INTO image (name, raster)
              VALUES ('beautiful image', lo_import('/etc/motd'));
                                                   SELECT lo_export(image.raster, '/tmp/motd') from image
               WHERE name = 'beautiful image';                                              

--
Eric G. Miller <egm2@jps.net>

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

Предыдущее
От:
Дата:
Сообщение: Re: Handling of large objects in DBD::Pg? (fwd)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: System Catalog