Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 isnot in select list"

Поиск
Список
Период
Сортировка
Искать
От
Ashutosh Bapat
Тема
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 isnot in select list"
Дата
Msg-id
CAFjFpRcShdm5V_9Je4CzaRw31QhDW4s6VKzZ2m50JvKANL4jjw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is notin select list" PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 isnot in select list" Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 isnot in select list" Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 isnot in select list" Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: BUG #15352: postgresql FDW error "ERROR: ORDER BY position 0 is not in select list" Andrew Gierth <andrew@tao11.riddles.org.uk>
On Tue, Aug 28, 2018 at 7:53 PM, Andrew Gierth
 wrote:
>>>>>> "Andrew" == Andrew Gierth  writes:
>
>  Andrew> It seems obviously wrong that a constant pathkey with no actual
>  Andrew> reference to the foreign table should be being pushed down, so
>  Andrew> so far I suspect that get_useful_pathkeys_for_relation isn't
>  Andrew> being selective enough about what is "useful". In this context
>  Andrew> I find it suspicious that find_em_expr_for_rel will return an
>  Andrew> expr with no vars as being "for" every rel, since it's just
>  Andrew> looking for a subset.

Sorry for replying late. I am not able to understand why it's wrong to
push a constant or for the matter any shippable expression which
doesn't refer to the foreign table/s (for that matter any tables)
under consideration down to the foreign server. The context in the
original mail doesn't help. I haven't checked the original thread on
bugs mailing list. I agree that ordering by such an expression is
useless, but if we are getting that done from a foreign server, what's
the harm? But by not doing it we might be loosing some optimization
since postgres_fdw pushes all or none of pathkeys.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

В списке pgsql-bugs по дате отправления
От: Alexander Kukushkin
Дата:
От: Andrew Gierth
Дата:
FAQ