PostgreSQL | ||
---|---|---|
Prev | Chapter 45. pgtcl | Next |
The pg_lo* routines are interfaces to the Inversion Large Objects in Postgres. The functions are designed to mimic the analogous file system functions in the standard Unix file system interface.
Table 45-1. PGTCL Commands
Command | Description |
---|---|
pg_connect | opens a connection to the backend server |
pg_disconnect | closes a connection |
pg_exec | send a query to the backend |
pg_select | loop over the result of a select statement |
pg_result | manipulate the results of a query |
pg_lo_creat | create a large object |
pg_lo_open | open a large object |
pg_lo_close | close a large object |
pg_lo_read | read a large object |
pg_lo_write | write a large object |
pg_lo_lseek | seek to a position on a large object |
pg_lo_tell | return the current seek position of a large object |
pg_lo_unlink | delete a large object |
pg_lo_import | import a Unix file into a large object |
pg_lo_export | export a large object into a Unix file |
Some commands equivalent to libpq commands are provided for connection and query operations.
The pg_lo* routines should typically be used within a BEGIN/END transaction block because the file descriptor returned by pg_lo_open is only valid for the current transaction. pg_lo_import and pg_lo_export MUST be used in a BEGIN/END transaction block.
Prev | Home | Next |
pgtcl | Up | Examples |