From | Vishal Kashyap @ [SaiHertz] |
---|---|
Subject | Re: Image Insert Postgresql DB |
Date | |
Msg-id | [email protected] Whole thread Raw |
In response to | Image Insert Postgresql DB (sreejith s <[email protected]>) |
List | 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
Соглашаюсь с условиями обработки персональных данных