Re: binary format of array stored as text - Mailing list pgsql-general

From Merlin Moncure
Subject Re: binary format of array stored as text
Date
Msg-id b42b73150909021308n46231a74r383882ed5ed9db92@mail.gmail.com
Whole thread Raw
In response to binary format of array stored as text  (Dave Huber <DHuber@letourneautechnologies.com>)
List pgsql-general
On Wed, Sep 2, 2009 at 3:50 PM, Dave
Huber<DHuber@letourneautechnologies.com> wrote:
> I have an old table with a column specified as integer[]. The data within
> this column was stored as text ala {1,2,3,…} yada yada. I have an
> application where I am reading all the columns from a row in this table in
> binary format. Does anybody know how I can recast/reshape this binary data
> back into an array of integers?

check out our libpqtypes library:
http://libpqtypes.esilo.com/

It pulls all data as binary and allows you to access array elements,
and you can write data the same way.  PostgreSQL binary formats are
more complicated than you think: there is dimension information, etc.
in there.  (that said, sending int[] as binary is much faster).

merlin

pgsql-general by date:

Previous
From: Sergey Samokhin
Date:
Subject: Should I create an index for partition with fixed key?
Next
From: Lennin Caro
Date:
Subject: Re: Ungooglable error message when running initdb: Symbol not found: _check_encoding_conversion_args