Run PostgreSQL's psql shell interactively
psql(psql_opts = "")
a character string passed to the psql command
psql function repeatedly queries for input and pipes it to
PostgreSQL's psql command. It will terminate on
\q or empty
psql_opts is an empty string, then an attempt will be made to
supply suitable options based on the current connection. If there is no
active connection, psql will fallback to complied in defaults. If
psql_opts is not an empty string, then it will be passed as-is to
You can type psql's escape commands as usual. Try
\ef to evoke an editor. Doing strange
\! will likely hang the R session.
There is no way to direclty enter a database password. If one is required,
you can use a password file
Unfortunately it is probably impossible to enable GNU readline support so for example up-arrow will recall your R commands, not the psql commands entered. You can always call psql from a terminal.
Timothy H. Keitt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.