public inbox for [email protected]
help / color / mirror / Atom feedStorage requirements for NUMERIC
2+ messages / 2 participants
[nested] [flat]
* Storage requirements for NUMERIC
@ 2005-05-01 00:03 David Fetter <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: David Fetter @ 2005-05-01 00:03 UTC (permalink / raw)
To: pgsql-docs
Folks,
Please find a patch per IRC chat yesterday that clarifies how much
space a NUMERIC takes.
Cheers,
D
--
David Fetter [email protected] http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778
Remember to vote!
Index: doc/src/sgml/datatype.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/datatype.sgml,v
retrieving revision 1.156
diff -c -r1.156 datatype.sgml
*** doc/src/sgml/datatype.sgml 13 Mar 2005 09:36:30 -0000 1.156
--- doc/src/sgml/datatype.sgml 30 Apr 2005 23:57:51 -0000
***************
*** 503,511 ****
<para>
Numeric values are physically stored without any extra leading or
trailing zeroes. Thus, the declared precision and scale of a column
! are maximums, not fixed allocations. (In this sense the <type>numeric</>
! type is more akin to <type>varchar(<replaceable>n</>)</type>
! than to <type>char(<replaceable>n</>)</type>.)
</para>
<para>
--- 503,513 ----
<para>
Numeric values are physically stored without any extra leading or
trailing zeroes. Thus, the declared precision and scale of a column
! are maximums, not fixed allocations, so each numeric needs eight
! bytes in headers and two bytes for each four decimal digits actually
! stored. (In this sense the <type>numeric</> type is more akin to
! <type>varchar(<replaceable>n</>)</type> than to
! <type>char(<replaceable>n</>)</type>.)
</para>
<para>
Attachments:
[text/plain] numeric_storage.diff (1.3K, 2-numeric_storage.diff)
download | inline diff:
Index: doc/src/sgml/datatype.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/datatype.sgml,v
retrieving revision 1.156
diff -c -r1.156 datatype.sgml
*** doc/src/sgml/datatype.sgml 13 Mar 2005 09:36:30 -0000 1.156
--- doc/src/sgml/datatype.sgml 30 Apr 2005 23:57:51 -0000
***************
*** 503,511 ****
<para>
Numeric values are physically stored without any extra leading or
trailing zeroes. Thus, the declared precision and scale of a column
! are maximums, not fixed allocations. (In this sense the <type>numeric</>
! type is more akin to <type>varchar(<replaceable>n</>)</type>
! than to <type>char(<replaceable>n</>)</type>.)
</para>
<para>
--- 503,513 ----
<para>
Numeric values are physically stored without any extra leading or
trailing zeroes. Thus, the declared precision and scale of a column
! are maximums, not fixed allocations, so each numeric needs eight
! bytes in headers and two bytes for each four decimal digits actually
! stored. (In this sense the <type>numeric</> type is more akin to
! <type>varchar(<replaceable>n</>)</type> than to
! <type>char(<replaceable>n</>)</type>.)
</para>
<para>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Storage requirements for NUMERIC
@ 2005-05-01 15:55 Tom Lane <[email protected]>
parent: David Fetter <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2005-05-01 15:55 UTC (permalink / raw)
To: David Fetter <[email protected]>; +Cc: pgsql-docs
David Fetter <[email protected]> writes:
> Please find a patch per IRC chat yesterday that clarifies how much
> space a NUMERIC takes.
Applied with minor editorialization.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-05-01 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-01 00:03 Storage requirements for NUMERIC David Fetter <[email protected]>
2005-05-01 15:55 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox