Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C7874B5DBD6 for ; Fri, 1 Jul 2011 15:34:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 51040-05 for ; Fri, 1 Jul 2011 18:34:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by mail.postgresql.org (Postfix) with ESMTP id 2D28EB5DBCC for ; Fri, 1 Jul 2011 15:34:19 -0300 (ADT) Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p61IXmr1010593 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 1 Jul 2011 11:33:50 -0700 Received: by wyg8 with SMTP id 8so2368316wyg.19 for ; Fri, 01 Jul 2011 11:33:48 -0700 (PDT) Received: by 10.216.78.198 with SMTP id g48mr3426622wee.45.1309545228142; Fri, 01 Jul 2011 11:33:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.70.149 with HTTP; Fri, 1 Jul 2011 11:33:18 -0700 (PDT) In-Reply-To: <1830.1309544251@sss.pgh.pa.us> References: <1830.1309544251@sss.pgh.pa.us> From: Thom Brown Date: Fri, 1 Jul 2011 19:33:18 +0100 Message-ID: Subject: Re: Functions example results incorrect To: Tom Lane Cc: pgsql-docs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201107/4 X-Sequence-Number: 6871 On 1 July 2011 19:17, Tom Lane wrote: > Thom Brown writes: >> It says that exp(1.0) yields 2.71828182845905. > > exp(1.0) invokes numeric exp() these days, but when the examples were > written, it would have invoked float8 exp(). =A0At least on my machine, > float8 does give the cited results > > Not sure if we want to change the examples or not. =A0As per the comment > above the table, these results are inherently a bit platform-dependent, > so someone who is expecting to match the results exactly is likely to be > disappointed anyhow. Fair enough. >> The quote literal example of quote_literal('O\'Reilly') doesn't work >> on my installation by default. > > Hmm, should we use an E'' literal there, or change the input to be > 'O''Reilly'? =A0The former would confuse people who didn't understand E'' > literals, while the latter would make it look like quote_literal wasn't > doing anything at all, so neither alternative seems to offer much > clarity. My concern is that people copying the example as a way to quote their string literal will find that, by default, it doesn't work. I'll leave it to your better judgement though as I can see that the E'' notation could potentially confuse. It is possible, either way, to add a footnote to the example? --=20 Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company