- Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
RPostgres appears to not write integer64
to database as long int
.
By-hand reprex below.
Notice the table created appears to have a floating point type.
packageVersion("RPostgres") ## [1] '1.0.4' db <- DBI::dbConnect( RPostgres::Postgres(), host = 'localhost', port = 5432, user = 'johnmount', password = '') ## Warning: multiple methods tables found for 'dbQuoteLiteral' d <- DBI::dbGetQuery( db, "SELECT COUNT(1) FROM pg_catalog.pg_tables") str(d) ## 'data.frame': 1 obs. of 1 variable: ## $ count:integer64 189 DBI::dbWriteTable(db, "d", d, temporary = TRUE, overwrite = TRUE) DBI::dbGetQuery(db, " SELECT column_name, data_type, numeric_precision, numeric_precision_radix, udt_name FROM information_schema.columns WHERE table_name = 'd' ") ## column_name data_type numeric_precision numeric_precision_radix udt_name ## 1 count real 24 2 float4 d2 <- DBI::dbReadTable(db, "d") str(d2) ## 'data.frame': 1 obs. of 1 variable: ## $ count: num 189 DBI::dbDisconnect(db)
Metadata
Metadata
Assignees
Labels
No labels