update_psql_counter <- function(db, table, id_colname) {
RPostgreSQL::dbGetQuery(db$con, paste0("SELECT pg_catalog.setval(pg_get_serial_sequence",
"('", table,"', '", id_colname, "'),",
"(SELECT MAX(", id_colname, ") FROM ",table,")+1);"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.