Re: [HACKERS] Reducing the overhead of NUMERIC data - Mailing list pgsql-patches

From Qingqing Zhou
Subject Re: [HACKERS] Reducing the overhead of NUMERIC data
Date
Msg-id dkh7ol$hmb$1@news.hub.org
Whole thread Raw
In response to Re: [HACKERS] Reducing the overhead of NUMERIC data  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> If we were willing to invent the "varlena2" datum format then we could
> save four bytes per numeric, plus reduce numeric's alignment requirement
> from int to short which would probably save another byte per value on
> average.  I'm not sure that that's worth doing if numeric and inet are
> the only beneficiaries, but it might be.
>

I would support "varlena2" from user's applications. Another benefit is for
char types. Many applications are from DB2, Oracle or SQL Server:

        Max Char Length
DB2         32672
SQL         8000
Oracle      4000

All of above just need varlena2. To support bigger char types, we could
follow the tradition "long varchar", etc.

Regards,
Qingqing



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: AIX FAQ addition
Next
From: "Pavel Stehule"
Date:
Subject: return can contains any row or record functions