Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 43FFAB5DCCB for ; Mon, 5 Sep 2011 12:56:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 80179-01 for ; Mon, 5 Sep 2011 15:56:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 8AF6EB5DC3B for ; Mon, 5 Sep 2011 12:56:05 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p85Fu3Q05428; Mon, 5 Sep 2011 11:56:03 -0400 (EDT) From: Bruce Momjian Message-Id: <201109051556.p85Fu3Q05428@momjian.us> Subject: Re: 'literal' for numbers In-Reply-To: <201102080158.p181w8J04985@momjian.us> To: Robert Haas Date: Mon, 5 Sep 2011 11:56:03 -0400 (EDT) CC: Tom Lane , PostgreSQL-documentation X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/13 X-Sequence-Number: 6934 Bruce Momjian wrote: > > So I guess I'm back agreeing with you. Basically, it seems like we > > ought to use 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 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 http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +