You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?:
no
Python version:
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Platform:
Ubuntu 22.04
Do you use pgbouncer?:
no
Did you install asyncpg with pip?:
no
If you built asyncpg locally, which version of Cython did you use?:
Can the issue be reproduced under both asyncio and uvloop?:
Strange error that looks like adding interval to date results in interval type (not date). Example traceback:
ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedFunctionError'>: operator does not exist: date < interval
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
[SQL:
SELECT
*
FROM result
WHERE date_create >= %s
AND date_create < %s + INTERVAL '1 day'
ORDER BY date_create]
[parameters: (datetime.date(2021, 1, 1), datetime.date(2021, 1, 31))]
(Background on this error at: https://sqlalche.me/e/14/f405) while handling path /api/v1/result/
Traceback of APIApp (most recent call last):
UndefinedFunctionError: operator does not exist: date < interval
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
File /usr/lib/python3/dist-packages/sqlalchemy/dialects/postgresql/asyncpg.py, line 399, in _prepare_and_execute
prepared_stmt, attributes = await adapt_connection._prepare(
File /usr/lib/python3/dist-packages/sqlalchemy/dialects/postgresql/asyncpg.py, line 641, in _prepare
prepared_stmt = await self._connection.prepare(operation)
File /usr/lib/python3/dist-packages/asyncpg/connection.py, line 566, in prepare
return await self._prepare(
File /usr/lib/python3/dist-packages/asyncpg/connection.py, line 584, in _prepare
stmt = await self._get_statement(
File /usr/lib/python3/dist-packages/asyncpg/connection.py, line 398, in _get_statement
statement = await self._protocol.prepare(
File asyncpg/protocol/protocol.pyx, line 168, in prepare
The text was updated successfully, but these errors were encountered:
the issue with a local PostgreSQL install?:
no
uvloop?:
Strange error that looks like adding interval to date results in interval type (not date). Example traceback:
The text was updated successfully, but these errors were encountered: