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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Дата
Msg-id 1823.1030388497@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think FOR UPDATE looks more correct at the end because it
> controls the visibility of the returned result, while LIMIT and the
> other previous clauses control the result.  FOR UPDATE clearly has a
> different effect than LIMIT, GROUP BY, WHERE, and the other previous
> clauses, so it makes more sense to me to have it at the end.

In the current implementation, FOR UPDATE acts after LIMIT does, so
putting it last would make sense --- SQL's optional clauses for SELECT
generally act left-to-right.
        regards, tom lane


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

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