Re: Image Insert Postgresql DB

Поиск
Список
Период
Сортировка
От Vishal Kashyap @ [SaiHertz]
Тема Re: Image Insert Postgresql DB
Дата
Msg-id 77b69d2104112220372649b6f0@mail.gmail.com
обсуждение исходный текст
Ответ на Image Insert Postgresql DB  (sreejith s <getsreejith@gmail.com>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: sreejith s
Дата:
Сообщение: Image Insert Postgresql DB
Следующее
От: Kenneth Gonsalves
Дата:
Сообщение: Re: Image Insert Postgresql DB