Uses Postgres' pg_total_relation_size to get the value, and pg_size_pretty to try and make it human readable directly

pg_total_relation_size(con, table_name, pretty = TRUE)

Arguments

con

DBI connection to the database

table_name

character with the table name you want to check

pretty

logical, if TRUE use pg_size_pretty

Value

character if pretty=TRUE, numeric otherwise