You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Tore Halset <ha...@pvv.ntnu.no> on 2006/12/07 11:13:49 UTC

types.xml, psql and oid/bytea

Hello.

I want to try out Slony-I replication solution for PostgreSQL. It  
does not handle oid-blobs, so I must use bytea instead. This is okay  
as my blobs are not that big.

PostgreSQL has a blob problem.. If the blob in the database are  
bytea, you must use setBytes/getBytes. If it is oid blob, then you  
must use setBlob, getBlob. cayenne ByteArrayType handle this with the  
usingBlob parameter.

Some time ago, cayenne switched from bytea to oid blob as a default  
blob data type. That was a good choice, but makes replication  
solutions like Slony-I and Sequoia difficult to implement.

I want to be able to run the PostgresAdapter with bytea as blob type.  
Should I create my own local sublcass of cayenne PostgresAdapter with  
its own types.xml or is there a better way?

  - Tore.

Re: types.xml, psql and oid/bytea

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Dec 7, 2006, at 11:22 , Andrus Adamchik wrote:

> Actually types.xml only affects DB generation. So I expect bytea to  
> work as before, with no changes to the adapter (as long as there  
> are no JDBC quirks of course).

Okay - thanks. I'll just specify a ByteArrayType with  
usingBlobs=false while setting up cayenne in my application.

I could switch my datatype over to VARBINARY, but what I realy want  
is a working Blob. Perhaps PostgreSQL will solve it in a year or two..

  - Tore.

Re: types.xml, psql and oid/bytea

Posted by Andrus Adamchik <an...@objectstyle.org>.
Actually types.xml only affects DB generation. So I expect bytea to  
work as before, with no changes to the adapter (as long as there are  
no JDBC quirks of course).

Andrus


On Dec 7, 2006, at 12:13 PM, Tore Halset wrote:

> Hello.
>
> I want to try out Slony-I replication solution for PostgreSQL. It  
> does not handle oid-blobs, so I must use bytea instead. This is  
> okay as my blobs are not that big.
>
> PostgreSQL has a blob problem.. If the blob in the database are  
> bytea, you must use setBytes/getBytes. If it is oid blob, then you  
> must use setBlob, getBlob. cayenne ByteArrayType handle this with  
> the usingBlob parameter.
>
> Some time ago, cayenne switched from bytea to oid blob as a default  
> blob data type. That was a good choice, but makes replication  
> solutions like Slony-I and Sequoia difficult to implement.
>
> I want to be able to run the PostgresAdapter with bytea as blob  
> type. Should I create my own local sublcass of cayenne  
> PostgresAdapter with its own types.xml or is there a better way?
>
>  - Tore.
>