From: Alvaro Herrera <alvherre@commandprompt.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Nathan M. Davalos <n.davalos@sharedmarketing.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Function trunc() behaves in unexpected manner with different data types
Date: Fri, 25 Feb 2011 12:40:09 -0300
Message-ID: <1298648330-sup-361@alvh.no-ip.org> (raw)
In-Reply-To: <AANLkTimeaNH81TemEzunroX6iotxpAceDFLMPY=7Lw12@mail.gmail.com>
References: <2701CF596B80DC44815FDBFFF5881A1E0104BB63@exchange01.sharedmarketing.com>
<AANLkTimWoBDGLN282PLRkg2eCuZTS6KJCEH_m0uQHrb-@mail.gmail.com>
<AANLkTin81WeP3+gOjyp6bX-m26vUjcBRBd2GRGkWwMxZ@mail.gmail.com>
<AANLkTinjSDnwhKXWqJNMTnxah75-RJf2A4svXBsqP_Fh@mail.gmail.com>
<21330.1298647285@sss.pgh.pa.us>
<AANLkTimeaNH81TemEzunroX6iotxpAceDFLMPY=7Lw12@mail.gmail.com>
Excerpts from Merlin Moncure's message of vie feb 25 12:28:25 -0300 2011:
> no I wouldn't, and the pg_dump extra_float_digits setting addresses my
> primary concern. The client has a similar issue though -- suppose it
> fetches a value from the server and updates it back -- which record
> gets the update? You would get different results if the client was
> using binary or text features of the protocol. Not saying this is
> wrong or needs to be fixed, just pointing it out :-).
>
> update foo set val=val + 1 where val = 2183.68;
I think the mere idea of using floating point equality on a
WHERE clause is bogus, regardless of text or binary format.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@commandprompt.com, mmoncure@gmail.com, tgl@sss.pgh.pa.us, gsstark@mit.edu, n.davalos@sharedmarketing.com
Subject: Re: Function trunc() behaves in unexpected manner with different data types
In-Reply-To: <1298648330-sup-361@alvh.no-ip.org>
References: <2701CF596B80DC44815FDBFFF5881A1E0104BB63@exchange01.sharedmarketing.com> <AANLkTimWoBDGLN282PLRkg2eCuZTS6KJCEH_m0uQHrb-@mail.gmail.com> <AANLkTin81WeP3+gOjyp6bX-m26vUjcBRBd2GRGkWwMxZ@mail.gmail.com> <AANLkTinjSDnwhKXWqJNMTnxah75-RJf2A4svXBsqP_Fh@mail.gmail.com> <21330.1298647285@sss.pgh.pa.us> <AANLkTimeaNH81TemEzunroX6iotxpAceDFLMPY=7Lw12@mail.gmail.com> <1298648330-sup-361@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox