Description

Usage,
pgCreateTempTable(pg_conn, schema_tbl, index_cols, query)

Arguments

pg_conn

connection string Postgres connection pointer/string (PqConnection)

schema_tbl

character Schema.table name.

index_cols

character Expects a vector of column names...c('col1','col2','col3')

query

character Query string to run in database. created from RPostgres::Postgres(). JDBC connections will break this function.

Value

The results will look like the print out below. It is a generic print out from RPostgres. Check the table metadata in Postgres server to check primary key build.

Details

The table name needs to include the schema in the Postgres server. The list of primary keys can simply be "var1,var2,var3" because this will be inserted into an SQL statement that will be sent to the server.