Data Type Size Calculation

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: troy(at)frericks(dot)us
Subject: Data Type Size Calculation
Date: 2022-02-11 20:12:08
Message-ID: 164461032874.9678.9708057254834166884@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/datatype-numeric.html
Description:

> The actual storage requirement is two bytes for each group of four decimal
digits, plus three to eight bytes overhead.

Please describe what 'overhead' means.

I'd like to be able to calculate the data size of NUMBER(19,4). I can
calculate 2 bytes per 4 digits... with 19 digits, I have 5 groups of 4
digits,

so the data length I seek is 5 bytes + overhead... then I'm left hanging.
:(

Troy.
#

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2022-02-14 18:51:05 Re: Data Type Size Calculation
Previous Message Erwin Brandstetter 2022-02-10 17:08:51 Re: PL/pgSQL PERFORM WITH query