Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DF7624765EA for ; Wed, 28 Aug 2002 10:41:22 -0400 (EDT) Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id DDA194765DF for ; Wed, 28 Aug 2002 10:41:21 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g7SEfGE15627; Wed, 28 Aug 2002 10:41:16 -0400 (EDT) From: Bruce Momjian Message-Id: <200208281441.g7SEfGE15627@candle.pha.pa.us> Subject: Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? In-Reply-To: <21006.1030543878@sss.pgh.pa.us> To: Tom Lane Date: Wed, 28 Aug 2002 10:41:16 -0400 (EDT) Cc: Larry Rosenman , PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/2056 X-Sequence-Number: 27739 OK, applied with documenation updates showing only the new syntax. --------------------------------------------------------------------------- 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). > > regards, tom lane > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073