-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
running a test suite using sqlspec and asyncpg I noticed the following log on my db, I suppose it's coming from sqlspec but not 100% sure.
2026-02-06 14:04:58.742 UTC [96] ERROR: syntax error at or near ":" at character 494
2026-02-06 14:04:58.742 UTC [96] STATEMENT: SELECT
a.attname::text AS column_name,
pg_catalog.pg_get_expr(d.adbin, d.adrelid)::text AS column_default,
pg_catalog.format_type(a.atttypid, a.atttypmod) AS data_type,
CASE WHEN a.attnotnull THEN 'NO' ELSE 'YES' END AS is_nullable
FROM pg_catalog.pg_attribute AS a
INNER JOIN pg_catalog.pg_class AS c ON a.attrelid = c.oid
INNER JOIN pg_catalog.pg_namespace AS n ON c.relnamespace = n.oid
LEFT JOIN
pg_catalog.pg_attrdef AS d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE
c.relname =: table_name
AND n.nspname =: schema_name
AND a.attnum > 0
AND NOT a.attisdropped
ORDER BY a.attnum;
I suppose sqlspec runs some introspection queries ?
if yes and this comes from
| WHERE c.relname = :table_name |
c.relname =: table_name
so there might be a slight error in the replacement of bind-parameters and I wouldnt be surprised if the casting above in the query with 2 colons doest mess with the parsing.
URL to code causing the issue
No response
MCVE
# Your MCVE code hereSteps to reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See errorScreenshots
"In the format of: "
Logs
Package Version
0.38.4
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working