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
4
5
6
7
list_tables(only.names = TRUE)

describe_table(tablename, schemaname = NULL)

list_schema(only.names = TRUE)

list_databases(only.names = TRUE)

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
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)

thk686/rpg documentation built on Sept. 5, 2019, 11:13 p.m.