pgCreatePrimaryKey | R Documentation |
Description
pgCreatePrimaryKey(pg_conn, schema_name, table_name, primary_keys = "NA")
pg_conn |
connection string Postgres connection pointer/string (PqConnection) created from RPostgres::Postgres(). JDBC connections will break this function. |
schema_name |
character Posgres schema name. |
table_name |
character Postgres table name. |
primary_keys |
character list of primary keys. |
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.