database

Interface to SQL databases, currently only postgresql using libpq.

Select category:

Postgresql connection

pq_connect
Establishes a connection to a postgresql server according to SETTINGS and returns an 'octave_pq_connection' object CONNECTION which can be passed to other functions of the package.
pq_close
Closes connection CONNECTION to a postgresql server.
pq_update_types
Updates information on existing postgresql types for CONNECTION.
pq_conninfo
Retrieves connection information for postgresql connection CONNECTION, specified by the string LABEL, and returns the value of this information in VAL.

Postgresql command execution

pq_exec_params
Sends the string COMMAND, which must contain a single SQL command, over the connection CONNECTION.

Postgresql large objects

pq_lo_import
Imports the file in PATH on the client side as a large object into the database associated with CONNECTION and returns the Oid of the new large object.
pq_lo_export
Exports the large object of Oid OID in the database associated with CONNECTION to the file PATH on the client side.
pq_lo_unlink
Removes the large object of Oid OID from the database associated with CONNECTION.
pq_lo_view
Exports the large object of Oid OID in the database associated with CONNECTION to a temporary file and starts the program VIEWER in the background with the name of the temporary file as argument.

Documentation

database_doc
Show database package documentation.

Helpers

var2bytea
Save input values in uint8 arrays in Octaves binary save format.
bytea2var
Restore variable values from uint8 arrays generated with 'var2bytea'.

Option setting

setdbopts
Create settings structure for database functions.
getdbopts
Return a specific setting from a structure created by 'setdbopts'.

Package: database