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

feat: dbQuoteLiteral() correctly quotes 64-bit integers from the bit64 package (of class "integer64") #436

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

karawoo
Copy link
Contributor

@karawoo karawoo commented Jul 8, 2023

Fixes #435 by adding a branch of logic to dbQuoteLiteral_PqConnection that checks if the value is integer64, and if so appending ::int8.

@krlmlr krlmlr changed the title Treat integer64 values as bigints in dbQuoteLiteral feat: dbQuoteLiteral() correctly quotes 64-bit integers from the bit64 package (of class "integer64") Jul 8, 2023
@krlmlr krlmlr merged commit 2566556 into r-dbi:main Jul 10, 2023
@krlmlr
Copy link
Member

krlmlr commented Jul 10, 2023

Thanks! I wonder why not use bit64::as.integer64(1) in the test, but this is a detail.

@karawoo
Copy link
Contributor Author

karawoo commented Jul 10, 2023

Sorry, for some reason I thought RPostgres didn't have a direct dependency on bit64, but I see that it actually does. I can update if you want.

@krlmlr
Copy link
Member

krlmlr commented Jul 10, 2023

Thanks, there's no need -- it's easily done when we touch the code the next time.

krlmlr added a commit that referenced this pull request Mar 31, 2024
RPostgres 1.4.6

- Breaking change: `dbListObjects()` only allows `Id()` objects as `prefix` argument (@dpprdan, #390).

- Use `NULL` in favor of `NULL::text` when quoting strings and literals, to support JSON and other text-ish types. Fixes a regression introduced in #370 (#393, #425).

- `dbQuoteLiteral()` correctly quotes 64-bit integers from the bit64 package (of class `"integer64"`) (@karawoo, #435, #436).

- Breaking change: `dbListObjects()` only allows `Id()` objects as `prefix` argument (@dpprdan, #390).

- Windows: update to libpq-15.3 (#442).

- Upgrade boost to 1.81.0-1 to fix sprintf warnings (#417).

- Suppress warning in gcc-12 (#443).

- Tweak driver docs (@dpprdan, #433).

- Relicense as MIT.

- Close result set.

- Replace Rcpp by cpp11 (@Antonov548, #419).
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigints in dbQuoteLiteral
2 participants