-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When using PostgreSQL, applying filters on DateTime columns (e.g., created_at) via the admin API causes a server error due to a type mismatch in the generated SQL.
💥 Error
Filtering on a DateTime field with a request like:
GET /api/admin/api/company?where={
"and": [
{ "created_at": { "gt": "2025-06-12T17:41:00+03:00" } }
]
}
Produces the following error:
sqlalchemy.exc.ProgrammingError: (psycopg.errors.UndefinedFunction)
operator does not exist: timestamp with time zone > character varying
LINE 3: WHERE backend_schema.companies.created_at > $1::VARCHAR
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
This occurs because the filter value is interpreted as a VARCHAR, while the column is of type TIMESTAMPTZ.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
