Learn R Programming

rpg (version 1.6)

create_index: Create an index

Description

Create and index on an existing table column

Usage

create_index(tablename, columnname, schemaname = NULL, indexname = NULL,
  unique = FALSE, using = NULL, collate = NULL, descending = FALSE,
  tablespace = NULL, where = NULL)

add_primary_key(tablename, columnname, schemaname = NULL)

add_foreign_key(tablename, columnname, foreign_table, foreign_column = NULL, schemaname = NULL, foreign_schema = schemaname)

create_schema(schemaname)

add_column(columnname, columntype, tablename, schemaname = NULL)

createdb(name)

dropdb(name, if_exists = TRUE)

Arguments

tablename

the name of the table

columnname

the name of the column

schemaname

specifically in this schema

indexname

optional index name to use

unique

if true, create a unique index

using

the index method

collate

set collation

descending

if true, sort descending

tablespace

create in this tablespace

where

restrict to rows matching predicate

foreign_table

the foreign table name

foreign_column

a key column (defaults to primary key)

foreign_schema

the schema of the foreign table

columntype

the column SQL type

name

name of the database

if_exists

don't fail on missing database

Details

Build an index on a column.