Re: Problem with Avg function and Money type in PostgreSQL 15

Поиск
Список
Период
Сортировка
От Erki Eessaar
Тема Re: Problem with Avg function and Money type in PostgreSQL 15
Дата
Msg-id AM9PR01MB8268CFF325F33A74F329E67EFE349@AM9PR01MB8268.eurprd01.prod.exchangelabs.com
обсуждение исходный текст
Ответ на Re: Problem with Avg function and Money type in PostgreSQL 15  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Yes, this the case. I am sorry for the false report. I retract it and apologise for the inconvinience.

Best regards
Erki Eessaar

From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Sunday, October 30, 2022 7:57 PM
To: Erki Eessaar <erki.eessaar@taltech.ee>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: Problem with Avg function and Money type in PostgreSQL 15
 
Erki Eessaar <erki.eessaar@taltech.ee> writes:
> CREATE TABLE Product(product_id SERIAL PRIMARY KEY,
> price MONEY NOT NULL);

> INSERT INTO Product(price) VALUES (30);
> INSERT INTO Product(price) VALUES (40);

> SELECT Avg(price) AS av FROM Product;

> PostgreSQL 15

> ERROR:  stack depth limit exceeded
> HINT:  Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
> CONTEXT:  SQL function "avg" during inlining


I get "function avg(money) does not exist" in all branches.
Judging from the mention of a SQL function, you must have
created a not-very-well-thought-out SQL function named "avg",
and that function is recursing till stack overflow.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem with Avg function and Money type in PostgreSQL 15
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17671: Query returns unexpected result