Skip site navigation (1) Skip section navigation (2)

wrong documentation and others .....

From: Gabriel Lopez <gabilm(at)dif(dot)um(dot)es>
To: psql <pgsql-interfaces(at)postgresql(dot)org>
Subject: wrong documentation and others .....
Date: 2000-10-05 10:59:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

    Hi all.

    I have several days working with LargeObject and postgres 7.0.2 and
I have found many problems. In the first time the postgresql doc is
wrong, in chapter 58 of PosgreSQL tutorial (JDBC Interfaces) it repot
who to work with Large Object and give code that is wrong:

        File file = new File("myimage.gif");
        FileInputStream fis = new FileInputStream(file);
        PreparedStatement ps = conn.prepareStatement("insert into images
values (?,?)");

        PreparedStatement ps = con.prepareStatement("select oid from
images where name=?");
        ResultSet rs = ps.executeQuery();
        if(rs!=null) {
            while( {
                InputStream is = rs.getBinaryInputStream(1);
                // use the stream in some way here

        InputStream ARE NOT SUPPORTED in JDBC implementation ¡¿?¡ and
"getBinaryInputStream()" really is "getBinaryStream()".  I think that it
is very serious. The other method (that I know) is using LargeObjectAPI,
but this fail every 9 times of PreparedStatement of setObject() sentence
¡¡¡ and when use LargeObjectManager as in source examples. (I send other
messages to list)

        Has PostgreSQL any way to work WELL with LargeObject.?

    Please reply me.

    Cheers, Gabi.

Gabriel López Millán
Facultad de Informática -Universidad de Murcia
30001 Murcia - España (Spain)
Telf: +34-968-364644 E-mail: gabilm(at)dif(dot)um(dot)es


pgsql-interfaces by date

Next:From: Troels Jegbjaerg MoerchDate: 2000-10-05 11:15:24
Subject: Re: wrong documentation and others .....
Previous:From: Billy G. AllieDate: 2000-10-05 03:47:42
Subject: Announcing PgSQL - a Python DB-API 2.0 compliant interface to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group