View source: R/add_pgcomments.R
add_pgcomments | R Documentation |
This function allows a user connected to a Postgres database to easily add comments for a single table or the table's fields.
add_pgcomments(conn, schema = "public", tbl_name = NULL, tbl.comments = NULL, field.comments = NULL, verbose = TRUE, overwrite = FALSE)
conn |
a object inheriting from |
schema |
an optional argument to specify the desired database schema location, default is |
tbl_name |
a required option if |
tbl.comments |
an optional argument to include a comment for the table being written, if a |
field.comments |
an optional argument to include comments for each field type within the table being written , if a |
verbose |
a |
overwrite |
a |
add_pgcomments()
returns TRUE
invisibly.
## Not run: nchar_df <- get_nchar(iris) myconn <- DBI::dbConnect(RSQL::SQLite(), ":memory:") my_fields <- set_pgfields(iris, default = FALSE, conn = myconn) write_pgtable(input = iris, field.types = my_fields, conn = myconn, tbl_name = "iris") add_pgcomments(conn = myconn, tbl_name = "iris", tbl.comments = "this is the iris dataset!", overwrite = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.