| From: | Brian Hurt <bhurt(at)janestcapital(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: probable faq: internal format of numerics |
| Date: | 2006-04-25 16:05:00 |
| Message-ID: | 444E48AC.2060903@janestcapital.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Tom Lane wrote:
>Brian Hurt <bhurt(at)janestcapital(dot)com> writes:
>
>
>>This is probably a FAQ, but I've googled the question and haven't found
>>an answer. What is the internal format of numerics?
>>
>>
>
>"Use the source, Luke"
>
>
>
This is what I was hoping to not do. It's generally not possible to
understand a peice of a project out of context- even well commented and
well structured code like the Postgres code looks to be.
That said, it looks like they're doing a variant of my #2- they're
holding 5 decimal digits every 2 bytes, plus an extra byte or so for the
sign. But consider the NumericVar structure defined in numeric.c- is
one of those stored with every row of a table, or are most of the values
stored once per table and only the digits stored in the row? From a
cursory reading of the code, it's hard for me to tell.
Brian
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-04-25 18:09:53 | Re: probable faq: internal format of numerics |
| Previous Message | Tom Lane | 2006-04-25 15:40:52 | Re: probable faq: internal format of numerics |