Re: [PATCHES] guc

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Liam Stewart <liams(at)redhat(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] guc
Date: 2002-01-17 22:35:24
Message-ID: Pine.LNX.4.30.0201171722530.725-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Liam Stewart writes:

> I've removed
> GetConfigOption() and replaced it with ShowConfigOption() which does an
> elog(NOTICE) instead of returning a string.

I certainly don't like that. I want to be able to get at the
configuration setting without any notice going off.

> When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style
> format string should be checked for certain things:

I wouldn't use a printf format string at all. It's not user-friendly --
not everyone is a C programmer, in fact most people aren't. It leaves
open too many ways to shoot yourself in the foot. And if you plan to
close all those ways you end up with a crippled system that is still
complex to understand for many.

What I would like to get out of the configurability of floating-point
numbers is:

1. The ability to dump them in binary or hex format for lossless
dump/reload. (printf("%a") does that.) That could be a boolean
setting.

2. To have (at least as an option) the same output format on all platforms.
Not sure how to approach that, perhaps it has nothing to do with
configurability.

Some people will also suggest

3. Be able to set the number of significant digits that are shown.

to allow simplifying the regression tests, but I do not think that that is
a good idea, because

a. If platforms behave differently, the test suite should not paint over
that; it might be important information.

b. If we actually break floating-point operations one day, we might miss
it.

c. Types represent data, data is altered by functions (round? truncate?).
Global side-effects are evil.

d. Input and output would not be inverses anymore.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

  • guc at 2002-01-17 21:54:34 from Liam Stewart

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-17 22:57:29 Re: [PATCHES] guc
Previous Message Tom Lane 2002-01-17 22:27:05 Re: Bug in pg_dump/restore -o

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-01-17 22:36:42 Re: postgresql-7.2b3-betterquote.patch
Previous Message Elliot Lee 2002-01-17 22:04:09 postgresql-7.2b3-betterquote.patch