Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONCAT with integer field and string argument crashes when using server-side cursors #136295

Open
timgraham opened this issue Nov 27, 2024 · 2 comments
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

Comments

@timgraham
Copy link
Contributor

timgraham commented Nov 27, 2024

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 type integer):

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:

  • CockroachDB version
    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

@timgraham timgraham added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Nov 27, 2024
Copy link

blathers-crl bot commented Nov 27, 2024

Hi @timgraham, please add branch-* labels to identify which branch(es) this C-bug affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Copy link

blathers-crl bot commented Nov 27, 2024

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-triaged blathers was able to find an owner labels Nov 27, 2024
@rafiss rafiss added regression Regression from a release. T-sql-queries SQL Queries Team labels Nov 27, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Nov 27, 2024
@rafiss rafiss added the branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Triage
Development

No branches or pull requests

2 participants