Re: [SQL] Can I store bitmap graphics in a table?

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Dan Delaney <dionysos(at)dionysia(dot)org>
Cc: PostgreSQL SQL Discussion <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] Can I store bitmap graphics in a table?
Date: 1998-07-22 05:42:49
Message-ID: Pine.LNX.3.96.980722063902.1291D-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 20 Jul 1998, Dan Delaney wrote:

> Hello all, can a bitmap graphic file be stored into a table? If so,
> how? What field type should I set up in the table and how do I
> insert the graphic file?
> Thanks.
> --Dan

You need to use large objects.

Currently you use the oid type to store a large object's oid in a table.
Then using the lo_ functions to store and retrieve the image.

The easiest thing to do is look at the docs, although you may want to look
at the ImageViewer example in the JDBC driver (src/interfaces/jdbc/examples)
as it does this exact thing.

--
Peter T Mount peter(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter(at)maidstone(dot)gov(dot)uk

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message rog 1998-07-22 16:35:27 Views
Previous Message Tom Lane 1998-07-20 20:01:33 Does SQL have anything like C's conditional expression?