List:MySQL++« Previous MessageNext Message »
From:Michael Hanselmann Date:January 7 2007 6:40pm
Subject:Re: inserting a vector into a MySQL blob field
View as plain text  
Hello Daniel

On Sun, Jan 07, 2007 at 03:49:43PM +0000, Daniel Thorpe wrote:
> I'm trying to store a vector of doubles into a blob field in a mysql  
> database, along with the size of the vector in another field.

Don't do that. Even if you could get it to work, you'll only have
issues. Different architectures save numbers in different ways (Big and
Little Endian, for example). At least for integers, you could also have
problems between 32 and 64 bit architectures. You should create another
table with a float column referencing the main table.

Greets,
Michael

-- 
Gentoo Linux developer, http://hansmi.ch/, http://forkbomb.ch/

Attachment: [application/pgp-signature]
Thread
inserting a vector into a MySQL blob fieldDaniel Thorpe7 Jan
  • Re: inserting a vector into a MySQL blob fieldMichael Hanselmann7 Jan
    • Re: inserting a vector into a MySQL blob fieldBill K9 Jan
  • Re: inserting a vector into a MySQL blob fieldWarren Young9 Jan