Re: BUG #18430: syntax error when using aggregate function in where clause of subquery

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #18430: syntax error when using aggregate function in where clause of subquery
Дата
Msg-id CAKFQuwa7hVExSqxd18JvZqE-bA76MFUgiUQO=0uBGAZqZb-EwQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18430: syntax error when using aggregate function in where clause of subquery  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Fri, Apr 12, 2024 at 10:32 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18430
Logged by:          Eric Atkin
Email address:      eatkin@certusllc.us
PostgreSQL version: 16.2
Operating system:   Arch Linux
Description:       

    (SELECT count(*) FROM delivery WHERE driver_id IN array_agg(driver.id))


This doesn't seem to have anything to do with scoping of inner and outer queries.  Where did you come to believe that:

scalar IN array

is a valid operator/expression.

i.e., your query fails for the same reason this one does:

select 1 in array[1,2,3];

David J.

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

Предыдущее
От: Eric Atkin
Дата:
Сообщение: Re: BUG #18430: syntax error when using aggregate function in where clause of subquery
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18429: Inconsistent results on similar queries with join lateral