-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Not sure if this fits here or needs to be created at the duckdb repo.
When I use glue_sql with timestamps, I get different resolutions for timestamps.
For duckdb I get second-level resolution, while postgres provides a higher resolution.
I would expect to receive the sub-second resolution in both cases!
glue::glue_sql(
"INSERT INTO TEST (val) VALUES ({Sys.time()});",
.con = DBI::dbConnect(duckdb::duckdb())
)
#> <SQL> INSERT INTO TEST (val) VALUES ('2025-06-20 12:20:25'::timestamp);
# ^ there is no subsecond resolution here!
glue::glue_sql(
"INSERT INTO TEST (val) VALUES ({Sys.time()});",
.con = DBI::dbConnect(RPostgres::Postgres(),
host = Sys.getenv("POSTGRES_HOST"),
port = Sys.getenv("POSTGRES_PORT"),
dbname = Sys.getenv("POSTGRES_DATABASE"),
user = Sys.getenv("POSTGRES_USER"),
password = Sys.getenv("POSTGRES_SECRET"))
)
#> <SQL> INSERT INTO TEST (val) VALUES ('2025-06-20 12:20:25.219384'::timestamp);
# this is what I would expect!Metadata
Metadata
Assignees
Labels
No labels