Oid Type

Hi,
i'm trying to save images on a postgres db.
I created a table like this:
CREATE TABLE image(name text, image oid);
and I inserted in it a file this way:
INSERT INTO image VALUES
('myimage',lo_import('/home/myhome/images/leaf.jpg'));

First of all: am I doing it right?

Now, when I write my query and I get my ResultSet what dataType I have
to use? For example:
ResultSet rs;
rs = rs = statement.executeQuery(query); //the query is a select *


Now I should get my "Oid" image and save it into a variable to use it.
How do I do it?

Thank you
Luca
Luca [ So, 12 Dezember 2004 18:56 ] [ ID #532953 ]
Datenbanken » comp.databases.postgresql.sql » Oid Type

Vorheriges Thema: rowtypes as arguments to functions
Nächstes Thema: The second RFD is in news.groups.