-
-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Introduction
SQLPage emits a warning regarding the casting syntax when using ::.
To Reproduce
Simplest example without needing any database setup (just a blank DuckDB database):
select '0'::int
from duckdb_functions()
limit 1;Actual behavior
Output in the logs:
[2026-01-23T22:53:24.247Z WARN sqlpage::webserver::database::sql] Casting with '::' is not supported on your database. For backwards compatibility with older SQLPage versions, we will transform it to CAST(... AS ...).
Expected behavior
As mentioned in the DuckDB docs:
The standard SQL syntax for explicit casting is CAST(expr AS TYPENAME), where TYPENAME is a name (or alias) of one of DuckDB's data types. DuckDB also supports the shorthand expr::TYPENAME, which is also present in PostgreSQL.
As the shorthand :: is supported, the warning should not appear and there's no need to transform the syntaxt to CAST(... AS ...).
Version information
- OS: Debian, but also reproducible on macOS
- Database: DuckDB
- SQLPage v0.42.0 (using the
docker.io/lovasoa/sqlpage:main-duckdbimage)
lovasoa
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working