From: Vishal Kashyap @ [SaiHertz] <vishalonlist@gmail.com>
To: sreejith s <getsreejith@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Image Insert Postgresql DB
Date: Tue, 23 Nov 2004 10:07:22 +0530
Message-ID: <77b69d2104112220372649b6f0@mail.gmail.com> (raw)
In-Reply-To: <5d14ecf904112220214ec08992@mail.gmail.com>
References: <5d14ecf904112220214ec08992@mail.gmail.com>
Dear Shreejith ,
> Data type for Image
> field in the DB is OID.
> copy of Image file actually resides in the client. V have to insert
> this image into the DB.
Firtsly crosscheck the data type is OID it must be either bytea or blob.
>
> Query to insert
> ----------------
> INSERT INTO Imagetable VALUES (lo_import('C:\\image\\peach.jpg'));
Out of experience I would suggest you to keep images on the file
system as database with images in it would be bulky and would takes
loads of time to restore and backup.
If these do not bother you continue with it.
Thats Pascal ??
Dont know about pascal but you would have to stream the file to the
server. I doubt that PostgreSQL will fetch from the client.
In PHP we would have Posted the file and exected the insert query
Hope this helps you.
--
With Best Regards,
Vishal Kashyap.
Lead Software Developer,
http://saihertz.com,
http://vishalkashyap.tk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: vishalonlist@gmail.com, getsreejith@gmail.com
Subject: Re: Image Insert Postgresql DB
In-Reply-To: <77b69d2104112220372649b6f0@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox