Re: Reducing NUMERIC size for 8.3

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Reducing NUMERIC size for 8.3
Дата
Msg-id 871wcof5iu.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Reducing NUMERIC size for 8.3  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: Reducing NUMERIC size for 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Reducing NUMERIC size for 8.3  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-hackers

We previously discussed compressing the numeric data type for small values:

http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php

We didn't do this for 8.3 but in any case Tom did suggest we ought to reverse
the weight and sign/dscale so we could do this sometime without introducing
another incompatibility.

I think we also should move the NumericData and declaration to numeric.c and
make the Numeric type an opaque pointer for the rest of the source tree. That
will catch any contrib modules or third-party modules which would be broken by
any new data representation.


--- numeric.h    27 Feb 2007 23:48:10 +0000    1.24
+++ numeric.h    24 Sep 2007 16:07:24 +0100    
@@ -63,8 +63,8 @@typedef struct NumericData{    int32        vl_len_;        /* varlena header (do not touch directly!)
*/
-    int16        n_weight;        /* Weight of 1st digit    */    uint16        n_sign_dscale;    /* Sign + display
scale*/
 
+    int16        n_weight;        /* Weight of 1st digit    */    char        n_data[1];        /* Digits (really
arrayof NumericDigit) */} NumericData;
 


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Reduce the size of memoryallocations by lazy vacuum when
Следующее
От: Tom Lane
Дата:
Сообщение: Re: stored procedure stats in collector