From: Bruce Momjian <bruce@momjian.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: Re: 'literal' for numbers
Date: Mon, 5 Sep 2011 11:56:03 -0400 (EDT)
Message-ID: <201109051556.p85Fu3Q05428@momjian.us> (raw)
In-Reply-To: <201102080158.p181w8J04985@momjian.us>
Bruce Momjian wrote:
> > So I guess I'm back agreeing with you. Basically, it seems like we
> > ought to use <literal> if it's being used as a value that the user
> > might want to supply (e.g. "if you set this parameter to 0, then no
> > statements will be logged). It shouldn't use <literal> if it's just
> > being used as a number (e.g. "this query will return all airplanes
> > with a height of less than 30,000 feet"). The cases I'm unsure about
> > are the ones where we're talking about a return value (e.g. in the
> > event of an error, this function will return -1).
>
> Robert, based on your logic, the 'return -1' should not be literal
> because no one would type that in. Unless I hear otherwise I will work
> on a patch to match the rules you outlined above.
FYI, here is what I thought was Robert's conclusion on this.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, robertmhaas@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: 'literal' for numbers
In-Reply-To: <201109051556.p85Fu3Q05428@momjian.us>
* 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