From: | "Pedro M(dot) Ferreira" <pfrazao(at)ualg(dot)pt> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Float output formatting options |
Date: | 2002-11-04 13:50:21 |
Message-ID: | 3DC67B1D.30108@ualg.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi All,
This relates to the recent discussion about floating point output format.
The discussion was at a point where one parameter would be added to
specify the number of extra digits used in fp output formatting.
The parameter would have a 0 default value, a maximum of 2 and the
minimum remained open for discussion.
In a previous message I proposed that for double precision numbers a
minimum value of -13 would be usefful. For single precision numbers this
corresponds to a value of -4.
I downloaded the PG sources and added two parameters (as PGC_USERSET):
int extra_float4_digits, default 0, min -4, max 2
int extra_float8_digits, defualt 0, min -13, max 2
Compiled and tested for these functionalities. It is ok.
The afected files are:
src/backend/utils/adt/float.c
src/backend/utils/misc/guc.c
src/bin/psql/tab-complete.c
src/backend/utils/misc/postgresql.conf.sample
I used sources from Debian source package, postgresql_7.2.1-2woody2.
Diff's produced with diff -u are enclosed as attachments.
Can you comment on this (particularly the min values) ?
Also, if we concluded that there is a need of 2 more digits, should'nt
this be the default ?
Best regards,
Pedro M. Ferreira
--
----------------------------------------------------------------------
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax: (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao
Attachment | Content-Type | Size |
---|---|---|
float.c.diff | text/plain | 1.0 KB |
guc.c.diff | text/plain | 1.0 KB |
tab-complete.c.diff | text/plain | 349 bytes |
postgresql.conf.sample.diff | text/plain | 456 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-11-04 14:29:14 | Re: pg_dump and large files - is this a problem? |
Previous Message | Rod Taylor | 2002-11-04 13:13:39 | Finishing Domains... |