You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/11/06 01:28:19 UTC
[I] c/driver/postgresql: Get option for strings returns null terminator [arrow-adbc]
paleolimbot opened a new issue, #1256:
URL: https://github.com/apache/arrow-adbc/issues/1256
First noted here: https://github.com/apache/arrow-adbc/issues/1129#issuecomment-1768879282
```r
library(adbcdrivermanager)
adbc_database_init(
adbcpostgresql::adbcpostgresql(),
uri = Sys.getenv("ADBC_POSTGRESQL_TEST_URI")
) |>
adbc_connection_init() |>
adbc_connection_get_option("adbc.connection.autocommit")
#> Error in adbc_connection_get_option(adbc_connection_init(adbc_database_init(adbcpostgresql::adbcpostgresql(),
#> :embedded nul in string: 'true\0'
```
It seems like this is intentional: https://github.com/apache/arrow-adbc/blob/main/c/driver/postgresql/connection.cc#L772-L776
...but I didn't expect it given the symmetry with getting bytes options and commitment to communicating the final size. Was it the intention that the null-terminator is included in the output size?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] c/driver/postgresql: Get option for strings returns null terminator [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1256:
URL: https://github.com/apache/arrow-adbc/issues/1256#issuecomment-1794771751
Intentional: https://github.com/apache/arrow-adbc/blob/313245b7ff4a45da56130400a83dc1e87be59975/adbc.h#L1587-L1588
Because C strings expect null terminators so it's generally easier to just make sure it's there (like how std::string technically wouldn't need one because it tracks the length, but for interoperability it still tracks a null terminator anyways)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] c/driver/postgresql: Get option for strings returns null terminator [arrow-adbc]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #1256: c/driver/postgresql: Get option for strings returns null terminator
URL: https://github.com/apache/arrow-adbc/issues/1256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org