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>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to