CONCAT with integer field and string argument crashes when using server-side cursors #136295
Labels
branch-release-24.3
Used to mark GA and release blockers, technical advisories, and bugs for 24.3
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-community
Originated from the community
regression
Regression from a release.
T-sql-queries
SQL Queries Team
X-blathers-triaged
blathers was able to find an owner
There are some known issues with CockroachDB + Django + psycopg3 server-side cursors. This one may be different. The exception is different, at least.
To Reproduce
Using the Django test suite:
./tests/runtests.py --settings=test_roach db_functions.text.test_concat.ConcatTests.test_concat_non_str
A simplified query (where
age
field is of typeinteger
):SELECT CONCAT("db_functions_author"."age", %s) AS "name_text" FROM "db_functions_author"
args=(':',)
psycopg.errors.InvalidTextRepresentation: error in argument for $1: could not parse ":" as type int2: strconv.ParseInt: parsing ":": invalid syntax
Expected behavior
No crash (works on PostgreSQL).
Environment:
Build Tag: v25.1.0-alpha.00000000-dev-6a7b1e20e70c0ba8e6bb7a42d52512d9437cd75b
Build Time: 2024/11/21 07:05:31
Additional context
CockroachDB 24.3 added support for CONCAT() to accept non-string data which fixed this query when using client-side cursors.
Jira issue: CRDB-44959
The text was updated successfully, but these errors were encountered: