Re: BUG #15904: ERROR: argument of LIMIT must not contain variables

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15904: ERROR: argument of LIMIT must not contain variables
Дата
Msg-id CAKFQuwZLr0QBB-HeteQ8fD+iVLNyjNDMwYKQ+CH=ZKps76_rrw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #15904: ERROR: argument of LIMIT must not contain variables  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15904: ERROR: argument of LIMIT must not contain variables  (Lakradi Marwan <lakradimarwan@gmail.com>)
Список pgsql-bugs
On Thu, Jul 11, 2019 at 8:06 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      15904
Logged by:          Lakradi Marwan
Email address:      lakradimarwan@gmail.com
PostgreSQL version: 11.4
Operating system:   Mac OS X - High Sierra
Description:       
 
I don't see the point, what is the main difference between
summary.amount_summed which is a float, and directly pass 100.0 ?

A limit applies to the query as a whole and cannot depend on individual records.  If you think that is wrong explain what the following query is supposed to return and why.

SELECT *
FROM (VALUES (1, 'one'), (2, 'two')) vals (i, t)
LIMIT CASE WHEN vals.i = 1 THEN 1 ELSE 2 END;

David J.

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15904: ERROR: argument of LIMIT must not contain variables
Следующее
От: Lakradi Marwan
Дата:
Сообщение: Re: BUG #15904: ERROR: argument of LIMIT must not contain variables