| From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
|---|---|
| To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
| Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Saving bytes in custom data type |
| Date: | 2011-03-16 22:26:04 |
| Message-ID: | AANLkTikp2BYev8fZ34bPNZJWE61nTDtoc67iJfpJ6-9M@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Mar 16, 2011 at 6:29 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> question: if you are storing just flags and bytes, why not use a bytea
> and store the flags out of line?
I'm not sure I understand your question. I am writing a custom
datatype with variable size more or less following the guidelines in
<http://www.postgresql.org/docs/9.0/static/xtypes.html>.
More in details I am hacking at a GMP wrapper
<http://pgmp.projects.postgresql.org/> and trying to store GMP
bignums, which I can re-create by just storing a variable list of
unsigned longs and a flag for the sign (note that this is not the
structure the GMP library use, but is enough data to re-create it and
one of the possible form of storage as a varlena - I'm just exploring
to decide the best one).
What do you mean for storing the flag out of line?
-- Daniele
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aleksey Tsalolikhin | 2011-03-16 23:12:30 | Re: autovacuum issue after upgrade to 9.0.1 |
| Previous Message | Tomas Vondra | 2011-03-16 22:16:44 | Re: query taking much longer since Postgres 8.4 upgrade |