Re: [GENERAL] [SQL] Can I store bitmap graphics in a table? - Mailing list pgsql-general

From Matt McClure
Subject Re: [GENERAL] [SQL] Can I store bitmap graphics in a table?
Date
Msg-id Pine.GSO.3.94.980721102222.18672G-100000@mercury.cis.yale.edu
Whole thread Raw
In response to [SQL] Can I store bitmap graphics in a table?  (Dan Delaney <dionysos@dionysia.org>)
Responses Re: [GENERAL] Can I store bitmap graphics in a table?  (Dan Delaney <dionysos@dionysia.org>)
Re: [GENERAL] [SQL] Can I store bitmap graphics in a table?  (Peter T Mount <peter@retep.org.uk>)
List pgsql-general
I'm relatively new to postgres myself, but I'll take a stab at this.
Anyone can feel free to correct me if I'm wrong.

You can insert the graphic file by declaring the type to be OID and using
lo_import().

For example:

create table graphics
(name text, graphic oid);

insert into graphics values ('pic1', lo_import ('gif1.gif'));

Check out the manpage for large_objects for more info.

BTW, does anyone know, once I create a large object, and it creates the
files xinv... and xinx..., how I can get rid of postgres's references to
these objects when I no longer need them.  (vacuum gives a notice that it
can't remove these even if I have physically removed the files from the
database's directory).

-Matt

On Tue, 21 Jul 1998, Dan Delaney wrote:

> Hello all,
>    Can a bitmap graphic file (say a GIF, JPEG, or EPS) be stored
> into a PostgreSQL table? If so, how? What field type should I set up
> in the table and how do I insert the graphic file?
>    Thanks.
>  --Dan
>
> -----------------------------------------------------------------------
>  Daniel G. Delaney                    The Louisville Times Chorus
>  Dionysos@Dionysia.org                   www.LouisvilleTimes.org
>  www.Dionysia.org/~dionysos/          Dionysia Design
>  ICQ Number: 8171285                     www.Dionysia.com/design/
> -----------------------------------------------------------------------
>                    I doubt, therefore I might be.
>
>
>
>
>


pgsql-general by date:

Previous
From: Herve Lefebvre
Date:
Subject: [GENERAL][SQL] Functions with composite resutl-set
Next
From: Dan Delaney
Date:
Subject: Re: [GENERAL] Can I store bitmap graphics in a table?