Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0DEB8634DB7 for ; Fri, 11 Dec 2009 13:22:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 62412-08 for ; Fri, 11 Dec 2009 17:22:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mail.postgresql.org (Postfix) with ESMTP id D27546347BA for ; Fri, 11 Dec 2009 13:22:22 -0400 (AST) Received: by ywh14 with SMTP id 14so1036988ywh.20 for ; Fri, 11 Dec 2009 09:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=2ZGbCfO1Z0O7CJKQaD7aVYx3lEXuCpuIkXXBw4YgsAc=; b=X/xeUOq6U/lk9NEnVpJQTxtkstFJbqUE7BaO4vOUsTBh3JzJNzL8j/eRgjzeWz5yI9 1IobpxHaWQGgJLC9Qrnd2oyT38C5OSaPOuXbTKlzQbCPuZxwpHW5FHgVVKPTyeofuHob TFRKOzPnlvCI4yJjFWyoHuou+TzxXebjgUyQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DZwoQuO99xRr4hvFcaGG5LJwPI7U1Oo+hiwpJExa0063rlcTZP7bTa1p/6sQBptSTF 8fDLjft34Q03AQiYkd1lm0dsKH72OJaqwdj3SGgRCdh1VVCVpWYEEbXryEXIfgFbdaqJ QXopkiAkJ2IBS3RaXYjqZ8WimFO9zEpSxoymY= MIME-Version: 1.0 Received: by 10.150.48.2 with SMTP id v2mr2885171ybv.169.1260552139605; Fri, 11 Dec 2009 09:22:19 -0800 (PST) In-Reply-To: <407fa4640912110854y551f47d8q6ba4acb048cdd4f9@mail.gmail.com> References: <407fa4640912110805m67b2bdfr8e4ff703647b6f8b@mail.gmail.com> <19400.1260548963@sss.pgh.pa.us> <407fa4640912110854y551f47d8q6ba4acb048cdd4f9@mail.gmail.com> Date: Fri, 11 Dec 2009 17:22:19 +0000 Message-ID: <407fa4640912110922g4afbd5aela91f816cbce75cf8@mail.gmail.com> Subject: Re: real -> numeric -> real result different through jdbc From: Michael Nacos To: Tom Lane Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd70c4c8087ff047a772a28 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.584 tagged_above=-10 required=5 tests=AWL=-0.845, BAYES_20=-0.74, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200912/29 X-Sequence-Number: 20110 --000e0cd70c4c8087ff047a772a28 Content-Type: text/plain; charset=UTF-8 > surely, it's not just a case of float4 display, type casting seems to be affected, too. I have run some more tests and I'd like to take this back. The reason our equality tests fail when extra_float_digits = 2 is this: we are constructing dynamic SQL statements inside a PL/pgSQL function. The SQL produced is, of course, affected by the textual representation of REALs in effect, hence the problems we have encountered. Thanks, this is making much more sense now. Michael --000e0cd70c4c8087ff047a772a28 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > surely, it's not just a case of float4 display, type casting seems= to be affected, too.

I have run some more tests and I'd like to take this back. The reas= on our equality tests fail when
extra_float_digits =3D 2 is this: we are= constructing dynamic SQL statements inside a PL/pgSQL
function. The SQL= produced is, of course, affected by the textual representation of REALs in= effect,
hence the problems we have encountered. Thanks, this is making much more se= nse now.

Michael

--000e0cd70c4c8087ff047a772a28--