Description Usage Arguments Value Author(s) See Also Examples
Get information about tables in a database
1 2 3 4 5 6 7 | list_tables(only.names = TRUE)
describe_table(tablename, schemaname = NULL)
list_schema(only.names = TRUE)
list_databases(only.names = TRUE)
|
only.names |
if true, just list the table names |
tablename |
the name of a PostgreSQL table |
schemaname |
if not null, look only in this schema |
list_tables
: a vector of table names or a data frame
describe_table
: a data frame with column information
Timothy H. Keitt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
createdb("rpgtesting")
connect("rpgtesting")
begin()
# write data frame contents
data(mtcars)
write_table(mtcars)
# get some information
list_tables()
describe_table("mtcars")
list_schema()
list_databases()
#cleanup
rollback()
disconnect()
dropdb("rpgtesting")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.