r-dbi / RPostgres

A DBI-compliant interface to PostgreSQL
https://rpostgres.r-dbi.org
Other
328 stars 78 forks source link

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

Closed karawoo closed 1 year ago

karawoo commented 1 year ago

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

krlmlr commented 1 year ago

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

karawoo commented 1 year ago

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 commented 1 year ago

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