Re: pg_upgrade and extra_float_digits

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and extra_float_digits
Date: 2010-05-16 03:22:55
Message-ID: 4BEF650F.6090908@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>>
>> Maybe I have misunderstood. How exactly is the server version being
>> hacked here? I know it's only for testing, but it still seems to me that
>> lying to a program as heavily version dependant as pg_dump is in general
>> a bad idea.
>>
>
> The code in pg_dump 9.0 is:
>
> /*
> * If supported, set extra_float_digits so that we can dump float data
> * exactly (given correctly implemented float I/O code, anyway)
> */
> if (g_fout->remoteVersion >= 90000)
> do_sql_command(g_conn, "SET extra_float_digits TO 3");
> else if (g_fout->remoteVersion >= 70400)
> --> do_sql_command(g_conn, "SET extra_float_digits TO 2");
>
> The indicated line had to be changed to '3'. I did not change anything
> else, and it was only done in my private CVS tree.
>
>

Oh, I see. It is pg_dump that you hacked. That wasn't clear to me from
what you first said.

But do earlier server versions accept a value of 3? The 8.4 docs say
"The value can be set as high as 2".

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2010-05-16 03:27:17 Re: Performance problem in textanycat/anytextcat
Previous Message Tom Lane 2010-05-16 03:21:36 Re: Performance problem in textanycat/anytextcat