Re: Getting rid of aggregate_dummy()
От | Isaac Morland |
---|---|
Тема | Re: Getting rid of aggregate_dummy() |
Дата | |
Msg-id | CAMsGm5cMQwh9uUmypvVE78VQ0C2Y0QOkU8h4NW5+oCZ-gNEJVQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Getting rid of aggregate_dummy() (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Mon, 2 Nov 2020 at 09:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Isaac Morland <isaac.morland@gmail.com> writes:
> Speaking as somebody who sometimes does really dumb things, I don’t like
> this change in error message. The current message clearly identifies the
> problem; the new message makes it look like there is a bug in Postgres.
Neither message would be reachable without (erroneous) C hacking,
so I don't quite buy that there's a problem.
OK, I must have misunderstood. I had the impression that we were talking about just writing a query which used an aggregate function where a normal function was needed, but on closer consideration I see I had it wrong. For example:
odyssey=> select * from uw_term where count(*) = 1;
ERROR: aggregate functions are not allowed in WHERE
LINE 1: select * from uw_term where count(*) = 1;
^
odyssey=>
But this is a different error message, and thinking about it putting an aggregate in the SELECT will end up using it as an aggregate (e.g. SELECT count(*) FROM ...).
I agree that C hackers need to know what they’re doing ;-)
В списке pgsql-hackers по дате отправления: