Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC1CE476983 for ; Thu, 5 Sep 2002 01:27:57 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id A3CDF476351 for ; Thu, 5 Sep 2002 01:27:55 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g855RMF05124; Thu, 5 Sep 2002 01:27:22 -0400 (EDT) From: Bruce Momjian Message-Id: <200209050527.g855RMF05124@candle.pha.pa.us> Subject: Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? In-Reply-To: <20020405160833.A917@ford.rockstorm.se> To: magnus.enbom@rockstorm.se Date: Thu, 5 Sep 2002 01:27:22 -0400 (EDT) Cc: pgsql-sql@postgresql.org 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: 200209/23 X-Sequence-Number: 9300 7.3, due out in a few months, will support both clause orderings. --------------------------------------------------------------------------- Magnus Enbom wrote: > Hi, > > I've just been hit by a small but annoying difference between postgres(7.2) > and mysql(4.x). > In postgresql you do: > > SELECT * FROM table FOR UPDATE LIMIT 1; > > and in mysql you do: > > SELECT * FROM table LIMIT 1 FOR UPDATE; > > Is it possible for postgres to accept the mysql syntax as well? > It's not that many databases that implement LIMIT, so it would be nice if the > ones that do have the same syntax(or can accept each others variants). > > -- Magnus > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- 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