From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Dave Huber <DHuber(at)letourneautechnologies(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: binary format of array stored as text |
Date: | 2009-09-02 20:08:21 |
Message-ID: | b42b73150909021308n46231a74r383882ed5ed9db92@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Sep 2, 2009 at 3:50 PM, Dave
Huber<DHuber(at)letourneautechnologies(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Lennin Caro | 2009-09-02 21:27:05 | Re: Ungooglable error message when running initdb: Symbol not found: _check_encoding_conversion_args |
Previous Message | Sergey Samokhin | 2009-09-02 19:53:09 | Should I create an index for partition with fixed key? |