You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2004/01/24 17:00:04 UTC

[WIKI-UPDATE] Steph Sat Jan 24 17:00:03 2004

Page: http://wiki.cocoondev.org/Wiki.jsp?page=Steph , version: 1 on Sat Jan 24 15:59:25 2004 by Steph

New page created:
+ Howto use a PostgreSQL database containing images (store and retrieve).
+ 
+ 
+ In this example, images are stored in a database, in the table images:
+ 
+   Colonne | Type  | Modifications 
+ ---------+-------+---------------
+  imgname | text  | 
+  img     | bytea | 
+ 
+ 
+ The type bytea stands for byte array. 
+ 
+ 1) How to store an image
+ 
+ As I don't know cocoon so well I decided to wrote a little program in JAVA which will be able to do this for me.
+ I choose java because I wanted to know how to use JDBC.
+ 
+  ! Why not doing it simply with "insert into images values ....." ?
+ 
+ An image is composed of a lot of bytes, so you won't do "INSRT INTOimages values 
+