pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sure.postgres <sure.postgres@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: The question about the type numeric
Date: Wed, 16 Apr 2014 10:04:47 +0800
Message-ID: <534DE539.2010804@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hi hackers,

I am learning about numeric .
The comment of NumericShort format is:
 * In the NumericShort format, the remaining 14 bits of the header word
 * (n_short.n_header) are allocated as follows: 1 for sign (positive or
 * negative), 6 for dynamic scale, and 7 for weight.  In practice, most
 * commonly-encountered values can be represented this way.

So the Max of the NumericShort format should be up to 508 digits before the decimal point.
So the sign of the number 12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567 
should be 0x807F.
The number is 257 digits before the decimal point.
But the sign is 0.
So is there anything wrong?

Thank you!

2014-04-15



wangshuo
HighGo Software Co.,Ltd.
Address: A203 Block D QILU Soft Park, High-Tech Zone, Lixia district, Jinan Shandong, China(Head Office)
Tel:+86-0531-55701530
Fax:+86-0531-55701544
Website:www.highgo.com
Mobile:18766416137

view thread (7+ messages)  latest in thread

Message-ID: <534DE539.2010804@gmail.com>
Permalink:  ../534DE539.2010804@gmail.com/
Also on:    postgresql.org/message-id/534DE539.2010804@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sure.postgres@gmail.com
  Subject: Re: The question about the type numeric
  In-Reply-To: <534DE539.2010804@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox