From: | "Vishal Kashyap (at) [SaiHertz]" <vishalonlist(at)gmail(dot)com> |
---|---|
To: | sreejith s <getsreejith(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Image Insert Postgresql DB |
Date: | 2004-11-23 04:37:22 |
Message-ID: | 77b69d2104112220372649b6f0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Kenneth Gonsalves | 2004-11-23 05:18:44 | Re: Image Insert Postgresql DB |
Previous Message | sreejith s | 2004-11-23 04:21:12 | Image Insert Postgresql DB |