Re: Variable LIMIT and OFFSET in SELECTs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Variable LIMIT and OFFSET in SELECTs
Дата
Msg-id 27857.1195198394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Variable LIMIT and OFFSET in SELECTs  (Reg Me Please <regmeplease@gmail.com>)
Ответы Re: Variable LIMIT and OFFSET in SELECTs
Список pgsql-general
Reg Me Please <regmeplease@gmail.com> writes:
>> The OP's complaint is that we don't allow a variable of the query's own
>> level, but AFAICT he's still not grasped the point that that leads to an
>> indeterminate limit value ...

> So it works, but it's not serious enough to be unlocked.

You really don't have a clue what this is about, do you?
Let me try to explain one more time.  You propose allowing

    select ... from
      table1 join table2 on table1.x = table2.y
      limit table1.z

Now this would be somewhat well-defined if there were only one row in
table1, or if there were many rows but they all had the same value
in column z.  But what if that's not the case?  If there are multiple
possible values for z then the query is just not sensible.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Variable LIMIT and OFFSET in SELECTs
Следующее
От: Anton
Дата:
Сообщение: ERROR: out of memory