On 06/01/2011, at 10:09 AM, Anjo Krank wrote:

> Hi, 
> 
> is anyone here using PG with bytea columns? 
> 
> I just updated a test db from 8.3 to 9.0 and am getting errors on received 
> data - rs.getBytes(col) returns the bytes (49) for the characters of my PKs, 
> not the bytes. 
> 
> In the shell, it looks like this in 8.3:
> 
> gaia=# select length(pk_id) from age_group limit 1;
> length 
> --------
>     24
> (1 row)
> 
> gaia=# select pk_id from age_group limit 1;
>                                        pk_id                                  
>        
> --------------------------------------------------------------------------------------
> \000\000\300\250\214\007\000\000\226\036\021\000\000\000\000\3678\363!\221\333m#\003
> (1 row)
> 
> for 9.0 it's like:
> 
> gaia=# select length(pk_id) from age_group limit 1;
> length 
> --------
>     24
> (1 row)
> 
> gaia=# select pk_id from age_group limit 1;
>                                        pk_id                                  
>        
> --------------------------------------------------------------------------------------
> \x0000c0a88c070000961e1100000000f738f32191db6d2303
> (1 row)
> 
> Updating drivers to 9.0 didn't help so far, my guess is that there is a new 
> setting. Is anyone familiar with PG and 9.0?

Haven't played with PG9 yet, but the shell commands are outputting exactly the 
same data, only the first one is in octal and the second is in hex.

http://www.postgresql.org/docs/9.0/static/datatype-binary.html

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to