Description Usage Arguments Value Examples
View source: R/db_tables_managment.R
List all indexes attached to tables of a database.
1 | pgListIndexes(conn, tables)
|
conn |
a PostgreSQLConnection object. |
tables |
character vector; tables names from wich to list indexes. If NULL (default), all indexes all returned. |
a dataframe.
1 2 3 4 5 6 7 8 | library(RPostgreSQL)
data(mtcars)
conn = dbConnect(drv=dbDriver("PostgreSQL"), host="localhost", port=5432,
dbname="postgres", user="milo", password="postgres")
dbWriteTable(conn, "mtcars", mtcars, overwrite=TRUE)
dbSendQuery(conn, "CREATE INDEX IF NOT EXISTS mpg_idx ON mtcars USING btree(mpg);")
head(pgListIndexes(conn, "mtcars"))
dbDisconnect(conn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.