Search Postgresql Archives

Re: standard LOB support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I found my understanding was incorrect.

> > > Is there any plan to support BLOB and CLOB in future releases?
> > >   
> > Looking at the spec, and postgresql's implementation, I can't
> > see much reason you couldn't just use a domain to declare that
> > a bytea is a blob and varchar is a clob.
> 
> That sounds a good idea!
> My application accesses databases via JDBC and PostgreSQL 
> JDBC driver can handle 'bytea' as BLOB. I'm not sure if 
> 'text' is compatible with CLOB, but I guess it'll also work well.

It seems like PG JDBC driver CANNOT  handle 'bytea' as BLOB nor 'text' as CLOB.
getBlob()/setBlob()/getClob()/setClob() can work with only Large Objects (at least with
postgresql-8.1-405.jdbc3.jar).

org.postgresql.util.PSQLException: Bad Integer Z\273\330x\336\335\226\243
	at org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet.java:862)
	at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSet.java:287)
	at org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:42)
	at PgTest.main(PgTest.java:33)

The same exception occurs when using getClob() against a text column.

Using Large Objects may solve my issue but I have to note that a large object is not automatically
deleted when the record referring to it is deleted.

Thanks,

ebi




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux