-
Notifications
You must be signed in to change notification settings - Fork 67
ERROR: ORDER/GROUP BY expression not found in targetlist #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Добрый день, @taleykoandrey! Спасибо за баг-репорт.
Видимо, это связано с prepared statements. Вы не могли бы сформировать небольшой тест-кейс (схема таблицы + запрос + партицирование) для воспроизведения проблемы? Это значительно ускорит поиск решения. |
CREATE TABLE Receipts ( CREATE INDEX receipts_receipts_payment_date_idx ON Receipts SELECT create_range_partitions('Receipts', CREATE OR REPLACE FUNCTION get_segment_by_date_avg_total ( RETURN QUERY END; select get_segment_by_date_avg_total('2017-02-01', '2017-02-01', 1, 10000); ERROR: ORDER/GROUP BY expression not found in targetlist |
to @taleykoandrey: Спасибо, я смог воспроизвести проблему на |
Исправлено в версии 1.4. |
Здравствуйте!
При выполнении функций, в теле которых имеется запрос с группировкой,
получаю ошибку.
ERROR: ORDER/GROUP BY expression not found in targetlist
CONTEXT: SQL statement "SELECT client_guid AS out_client_guid
FROM Receipts
WHERE payment_date BETWEEN in_date_begin AND in_date_end + interval '1 day'
AND total > 0
GROUP BY client_guid
Ошибка возникает не при первом, а, как правило, при 5-6 вызове функции
Если сделать запрос динамическим - ошибка не возникает.
The text was updated successfully, but these errors were encountered: