Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 44495 invoked from network); 24 Jan 2004 16:00:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Jan 2004 16:00:09 -0000 Received: (qmail 1097 invoked by uid 500); 24 Jan 2004 16:00:04 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 934 invoked by uid 500); 24 Jan 2004 16:00:03 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: docs@cocoon.apache.org Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 917 invoked from network); 24 Jan 2004 16:00:02 -0000 Received: from unknown (HELO otsrv1.iic.ugent.be) (157.193.121.51) by daedalus.apache.org with SMTP; 24 Jan 2004 16:00:02 -0000 Received: from otsrv1.iic.ugent.be (localhost [127.0.0.1]) by otsrv1.iic.ugent.be (8.11.6/8.11.6) with ESMTP id i0OG03O12089 for ; Sat, 24 Jan 2004 17:00:04 +0100 Date: Sat, 24 Jan 2004 17:00:04 +0100 Message-Id: <200401241600.i0OG03O12089@otsrv1.iic.ugent.be> From: stevenn@outerthought.org To: docs@cocoon.apache.org Subject: [WIKI-UPDATE] Steph Sat Jan 24 17:00:03 2004 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 +