Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 37FEA475EF1 for ; Wed, 28 Aug 2002 10:25:40 -0400 (EDT) Received: from briar.mmrd.com (unknown [208.255.226.182]) by postgresql.org (Postfix) with ESMTP id 7C441475EEB for ; Wed, 28 Aug 2002 10:25:39 -0400 (EDT) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by briar.mmrd.com (8.11.2/8.11.2) with ESMTP id g7SFO1F02142; Wed, 28 Aug 2002 11:24:01 -0400 Received: from [172.25.1.55] ([172.25.1.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id g7SEPgx21579; Wed, 28 Aug 2002 10:25:42 -0400 Subject: Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? From: Robert Treat To: Tom Lane Cc: Bruce Momjian , Larry Rosenman , PostgreSQL-development In-Reply-To: <21006.1030543878@sss.pgh.pa.us> References: <200208281352.g7SDqeB13438@candle.pha.pa.us> <21006.1030543878@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 28 Aug 2002 10:24:11 -0400 Message-Id: <1030544652.3216.7.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/2050 X-Sequence-Number: 27733 On Wed, 2002-08-28 at 10:11, Tom Lane wrote: > Bruce Momjian writes: > > Larry Rosenman wrote: > >> Why? If both old and new are acceptable, why not document it? > >> (Just curious, I'm not wedded to it). > > > Well, showing both versions adds confusion for no good reason, > > Yes, particularly considering that LIMIT ... FOR UPDATE corresponds > to the implementation behavior (LIMIT acts before FOR UPDATE) while > FOR UPDATE ... LIMIT does not. > > I concur with documenting only the preferred form (though there should > be a note in gram.y explaining that we're supporting the old syntax > for backward compatibility). > Doesn't the need for a note explaining that we're supporting the old syntax say to you that the documentation also needs to say we support the old syntax? I can see the bug reports now saying "this is clearly not what it says in the docs"... Robert Treat