Re: BUG #8629: Strange resultset when using CTE or a subselect

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: BUG #8629: Strange resultset when using CTE or a subselect
Дата
Msg-id CAGrpgQ9m9yQ8bsosVLcpxQHyOuaFid9ZgnmRrqqGig+YoBaf=A@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #8629: Strange resultset when using CTE or a subselect  (jonathan.camile@gmail.com)
Ответы Re: BUG #8629: Strange resultset when using CTE or a subselect
Список pgsql-bugs
On Mon, Nov 25, 2013 at 2:27 AM, <jonathan.camile@gmail.com> wrote:
>
> WITH filtred_table AS (
>     SELECT c.id
>     FROM my_table t
>     WHERE t.enabled = true
>     AND (t.hdata->'field')::integer = ANY ('{16788}')
> )
> SELECT my_table.id
> FROM  my_table
> WHERE mycontract.id IN (SELECT filtred_table.id FROM filtred_table)
> ORDER BY my_table.hdata->'field' DESC
> LIMIT 5
> OFFSET 5
>


Try with OFFSET 5 LIMIT 5. The offset should be applied *before* the LIMIT.

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