Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D0EE6474E49 for ; Wed, 28 Aug 2002 10:28:46 -0400 (EDT) Received: from squire.barchord.com (squire.barchord.com [216.194.67.18]) by postgresql.org (Postfix) with ESMTP id 43C1F47598A for ; Wed, 28 Aug 2002 10:28:46 -0400 (EDT) Received: from [10.0.2.172] (nat.inquent.com [216.6.14.45]) by squire.barchord.com (Postfix) with ESMTP id 59AE93AE; Wed, 28 Aug 2002 10:28:49 -0400 (EDT) Subject: Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? From: Rod Taylor To: Robert Treat Cc: Tom Lane , Bruce Momjian , Larry Rosenman , PostgreSQL-development In-Reply-To: <1030544652.3216.7.camel@camel> References: <200208281352.g7SDqeB13438@candle.pha.pa.us> <21006.1030543878@sss.pgh.pa.us> <1030544652.3216.7.camel@camel> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 28 Aug 2002 10:28:51 -0400 Message-Id: <1030544932.83275.58.camel@jester> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/2053 X-Sequence-Number: 27736 On Wed, 2002-08-28 at 10:24, Robert Treat wrote: > 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"... Yes, both should be documented. But mark the non-preferred version as depreciated and disappearing soon (whether it does or not is another story) but discourage people from using it.