Re: Functions example results incorrect

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Functions example results incorrect
Date: 2011-07-01 18:33:18
Message-ID: BANLkTikkiorhu6AEDcP8LcTUA+unMnhHeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 1 July 2011 19:17, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thom Brown <thom(at)linux(dot)com> 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().  At least on my machine,
> float8 does give the cited results
>
> Not sure if we want to change the examples or not.  As 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'?  The 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?

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2011-07-04 01:53:16 Re: pg_roles has a column rolconfig, but it's not documented.
Previous Message Thom Brown 2011-07-01 18:26:34 Re: Geometric function example results