Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Date
Msg-id 200209050527.g855RMF05124@candle.pha.pa.us
Whole thread Raw
In response to LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?  (Magnus Enbom <dot@rockstorm.se>)
List pgsql-sql
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,
Pennsylvania19073
 


pgsql-sql by date:

Previous
From: knut.suebert@web.de
Date:
Subject: Re: tree structures in sql - my point of view (with request of comment from joe celko)
Next
From: Daniel Kelley
Date:
Subject: fumbling for join syntax