Re: - Mailing list pgsql-general

From Eric G. Miller
Subject Re:
Date
Msg-id 20010224001115.A4731@calico.local
Whole thread Raw
In response to ...  (akif noor <akifnoor@yahoo.com>)
List 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 by date:

Previous
From:
Date:
Subject: Re: Handling of large objects in DBD::Pg? (fwd)
Next
From: Peter Eisentraut
Date:
Subject: Re: System Catalog