X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 170EF3A4DB5 for ; Fri, 7 Jan 2005 02:42:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30172-06 for ; Fri, 7 Jan 2005 02:42:23 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 92C033A4BAE for ; Fri, 7 Jan 2005 02:42:22 +0000 (GMT) Received: (qmail 14536 invoked by uid 1112); 7 Jan 2005 02:44:12 -0000 Date: Thu, 6 Jan 2005 21:44:12 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: =?ISO-8859-15?Q?Sven_K=F6hler?= Cc: pgsql-jdbc@postgresql.org Subject: Re: BLOBs etc In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.021 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/32 X-Sequence-Number: 11912 On Fri, 7 Jan 2005, [ISO-8859-15] Sven K=F6hler wrote: > on the jdbc-webpages it says, that the JDBC team may decide to change=20 > getBLOBG/setBLOB to support bytea only, and that one should use the=20 > PostGreSQL specific LargeObject extension to acces them. I'm not sure where it says that, but it is either out of date or just=20 plain bad advice. If you could point out where it says that I'd=20 appreciate it. I would stick withe the standard Blob interface for now. = =20 There are no plans to change this until better lob support is added to the= =20 server and I don't know of anyone working on that. Even when=20 that happens backward compatibility will be provided by a URL parameter. > Well, how should one be abled to use the LargeObjects extension, when=20 > ConnectionPools are used? The Connection object supplied by the=20 > ConnectionPool implementation is usually not the one supplied by the=20 > JDBC driver and therefor the object cannot be casted to PGConnection=20 > anymore. So the LargeObject extension cannot be used anymore like=20 > suggested on the page That depends on your connection pool. For example jakarta's dbcp allows=20 access to the underlying connection like this: PoolingDataSource dataSource =3D ...; dataSource.setAccessToUnderlyingConnectionAllowed(true); Connection conn =3D dataSource.getConnection(); Connection realConn =3D ((DelegatingConnection)conn).getInnermostDelegate()= ; PGConnection pgConn =3D (PGConnection)realConn; Kris Jurka