table-info: PostgreSQL database information

Description Usage Arguments Value Author(s) See Also Examples

Description

Get information about tables in a database

Usage

1
2
3
list_tables(only.names = TRUE)

describe_table(tablename, schemaname = NULL)

Arguments

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

Value

list_tables: a vector of table names or a data frame

describe_table: a data frame with column information

Author(s)

Timothy H. Keitt

See Also

psql

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
system("createdb rpgtesting")
connect("rpgtesting")
begin()

# write data frame contents
data(mtcars)
write_table(mtcars)

# get some information
list_tables()
describe_table("mtcars")

#cleanup
rollback()
disconnect()
system("dropdb rpgtesting")
## End(Not run)

rpg documentation built on May 2, 2019, 5:49 p.m.