I have enjoyed working with the RPostgres (R package) for a while now and it works very well on most things. One thing I recently ran into is it seems to automatically convert numeric types in R into REAL in my Postgres database. The REAL type seems to be very imprecise so I would ideally like to cast my numerics into a type that can handle many more digits (nothing crazy but at least 10 or so). Anyone know how I can accomplish that? Here is an example before of adding numbers...
library(RPostgres)
library(DBI)
library(tibble)
con <- DBI::dbConnect(RPostgres::Postgres(),
host = 'localhost',
port = 5432,
user = 'test',
password = '')
test_tbl <- tibble::tibble(number_use = 434.94823992383445)
DBI::dbWriteTable(con, "test_tbl", test_tbl)