From: | sobrien(at)id(dot)jefferson(dot)co(dot)us () |
---|---|
To: | pgsql-questions(at)postgreSQL(dot)org |
Subject: | Re: JPEG Files In Postgres Database |
Date: | 1999-04-26 19:12:07 |
Message-ID: | 7g2dq7$iop$1@news-2.csn.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Rick Bourassa (rickb(at)networxtech(dot)com) wrote:
: Can anyone tell me how to store jpeg fies in a Postgres table? What field
: type to use?
: I am doing some develpment with VB and ODBC.
Rick: I have had really good luck with the following:
create table pix (sch char(6), picture oid) archive=none;
grant select on pix to public;
insert into pix (sch, picture)
values ('001', lo_import('/home/sobrien/pix/knight.jpg'));
insert into pix (sch, picture)
values ('002', lo_import('/home/sobrien/pix/parrot.jpg'));
insert into pix (sch, picture)
values ('003', lo_import('/home/sobrien/pix/penguin.jpg'));
insert into pix (sch, picture)
values ('004', lo_import('/home/sobrien/pix/raccoon.jpg'));
insert into pix (sch, picture)
values ('005', lo_import('/home/sobrien/pix/rose.jpg'));
insert into pix (sch, picture)
values ('006', lo_import('/home/sobrien/pix/rundog.jpg'));
insert into pix (sch, picture)
values ('007', lo_import('/home/sobrien/pix/snail.jpg'));
insert into pix (sch, picture)
values ('008', lo_import('/home/sobrien/pix/spider.jpg'));
insert into pix (sch, picture)
values ('009', lo_import('/home/sobrien/pix/stork.jpg'));
insert into pix (sch, picture)
values ('010', lo_import('/home/sobrien/pix/tulip.jpg'));
Good Luck,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Jennis | 1999-04-26 21:18:38 | Re: [GENERAL] advice on buying sun hardware to run postgres |
Previous Message | Bruce Momjian | 1999-04-26 18:47:05 | Re: [GENERAL] advice on buying sun hardware to run postgres |