public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Thom Brown <[email protected]>
Cc: pgsql-docs <[email protected]>
Subject: Re: Functions example results incorrect
Date: Thu, 07 Jul 2011 19:16:54 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
Thom Brown <[email protected]> writes:
> On 1 July 2011 19:17, Tom Lane <[email protected]> wrote:
>> Thom Brown <[email protected]> writes:
>>> 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?
On further study, I notice that somebody already E-ified all the other
examples where it was important; the quote_literal example simply got
overlooked, I think. It seems better to use E'' there than make the
example potentially confusing as to what the function accomplishes.
Also, I looked at the examples for binary strings, and decided that
converting the sample outputs to hex format would render the examples
a lot less readable (since the inputs are not shown in that format).
So instead I'm going to add this:
<note>
<para>
The sample results shown on this page assume that the server parameter
<link linkend="guc-bytea-output"><varname>bytea_output</></link> is set
to <literal>escape</literal> (the traditional PostgreSQL format).
</para>
</note>
regards, tom lane
view thread (8+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Functions example results incorrect
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox