Table 1.1, “pgtcl Commands” gives an overview over the commands available in pgtcl. These commands are described in the reference chapter.
Table 1.1. pgtcl Commands
| Command | Description |
|---|---|
| pg_backend_pid | Get the backend process ID (PID) |
| pg_blocking | Get or set the connection mode - blocking or nonblocking |
| pg_cancelrequest | Cancel an in-progress asynchronous query |
| pg_conndefaults | Get connection options and their defaults |
| pg_connect | Open a connection to the server |
| pg_describe_cursor | Get information about a cursor (portal) |
| pg_describe_prepared | Get information about a prepared statement |
| pg_disconnect | Close a connection to the server |
| pg_encrypt_password | Encrypt a password/username combination |
| pg_escape_bytea | Escape a binary string for use in an SQL string constant with bytea (byte array) columns |
| pg_escape_identifier | Escape a string for use as an SQL identifier (object name) |
| pg_escape_literal | Escape a string for use as an SQL string literal |
| pg_escape_string | Escape a string for use in an SQL string constant |
| pg_exec | Execute an SQL command on the server |
| pg_exec_params | Execute a parameterized SQL command on the server |
| pg_exec_prepared | Execute a pre-prepared SQL command on the server |
| pg_execute | Execute an SQL command on the server and optionally loop over the results |
| pg_getresult | Wait for and return result from asynchronous SQL command |
| pg_isbusy | See if pg_getresult will block |
| pg_listen | Set a callback for asynchronous notification messages |
| pg_lo_close | Close a large object |
| pg_lo_creat | Create a large object |
| pg_lo_export | Export a large object to a file |
| pg_lo_import | Import a large object from a file |
| pg_lo_lseek | Seek to a position in a large object |
| pg_lo_lseek64 | Seek to a position in a large object, with 64-bit offset |
| pg_lo_open | Open a large object |
| pg_lo_read | Read from a large object |
| pg_lo_tell | Return the current seek position of a large object |
| pg_lo_tell64 | Return the current seek position of a large object, with 64-bit range |
| pg_lo_truncate | Truncate (or extend) the size of a large object |
| pg_lo_truncate64 | Truncate (or extend) the size of a large object, with 64-bit size |
| pg_lo_unlink | Delete a large object |
| pg_lo_write | Write to a large object |
| pg_notice_handler | Set a callback for notice or warning messages from the server |
| pg_on_connection_loss | Set a callback for unexpected connection loss |
| pg_parameter_status | Get the value of a parameter from the database server |
| pg_quote | Escape and quote a string for use in an SQL string |
| pg_result | Get information about a command result |
| pg_result_callback | Set a callback for asynchronous SQL command result availability |
| pg_select | Execute an SQL command on the server and loop over the results |
| pg_sendquery | Send an SQL command to the server for asynchronous execution |
| pg_sendquery_params | Send a parameterized SQL command to the server for asynchronous execution |
| pg_sendquery_prepared | Send a pre-prepared SQL command to the server for asynchronous execution |
| pg_server_version | Get the PostgreSQL server software version as an integer |
| pg_transaction_status | Get the current in-transaction status |
| pg_unescape_bytea | Unescape a string returned by an SQL query on a bytea (byte array) column, recovering the original binary string |