Learn R Programming

rpostgis (version 1.0.0)

dbComment: Comment table/view/schema.

Description

Comment on a table, a view or a schema.

Usage

dbComment(conn, name, comment, type = c("table", "view", "schema"), display = TRUE, exec = TRUE)

Arguments

conn
A connection object.
name
A character string specifying a PostgreSQL table, view or schema name.
comment
A character string specifying the comment.
type
The type of the object to comment, either table or view
display
Logical. Whether to display the query (defaults to TRUE).
exec
Logical. Whether to execute the query (defaults to TRUE).

Value

TRUE if the comment was successfully applied.

See Also

The PostgreSQL documentation: http://www.postgresql.org/docs/current/static/sql-comment.html

Examples

Run this code
## examples use a dummy connection from DBI package
conn<-DBI::ANSI()
dbComment(conn, name = c("fla", "bli"), comment = "Comment on a view.",
    type = "view", exec = FALSE)
dbComment(conn, name = "fla", comment = "Comment on a schema.", type = "schema",
    exec = FALSE)

Run the code above in your browser using DataLab