Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?

Поиск
Список
Период
Сортировка
От Magnus Enbom
Тема Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Дата
Msg-id 20020826215027.A15218@ford.rockstorm.se
обсуждение исходный текст
Ответ на Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
On Mon, Aug 26, 2002 at 02:42:26PM -0400, Jan Wieck wrote:
> Bruce Momjian wrote:
> > 
> > I found this email from April.  It properly points out that our
> > LIMIT/FOR UPDATE ordering doesn't match MySQL's, and MySQL's looks more
> > correct, specifically that the FOR UPDATE is after the LIMIT.  Our
> > grammar is:
> 
> How do you define "correct" for "non-standard" features? And why don't
> you ask Monty first to change to our "de-facto-standard"? ;-)

Already done that. ;-)
He said he would look into it(having MySQL accept both behaviors), but if 
it would require a big change of their grammar(for a value of big), he'd rather
not. He also pointed out(as Bruce and Tom have done) that our(PG) way is 
kind of backwards. 
If you look at Oracle, you can see that they also have it last:

select :== subquery -> for_update_clause ;

OTOH, Oracle doesn't have LIMIT, but that's another story...

-- Magnus


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?