Main Content

PostgreSQL Native Interface

Interact with a PostgreSQL database using the PostgreSQL native interface

Create a data source and connect to a PostgreSQL database. Explore data and import data from the database into MATLAB®. Export data from MATLAB into the database. Explore and import data using the Database Explorer app or the command line.

Objects

connectionPostgreSQL native interface database connection
SQLConnectionOptionsDefine PostgreSQL native interface database connection options

Functions

expand all

databaseConnectionOptionsCreate database connection options
rmoptionsRemove PostgreSQL native interface connection options
saveAsDataSourceSave PostgreSQL native interface data source
setoptionsSet PostgreSQL native interface connection options
resetReset PostgreSQL native interface connection options to defaults
testConnectionTest PostgreSQL native interface database connection
postgresqlCreate PostgreSQL native interface database connection
closeClose PostgreSQL native interface database connection
isopenDetermine if PostgreSQL native interface database connection is open
sqlfindFind information about all table types in PostgreSQL database
fetchImport results of SQL statement in PostgreSQL database into MATLAB
sqlreadImport data into MATLAB from PostgreSQL database table
sqlinnerjoinInner join between two PostgreSQL database tables
sqlouterjoinOuter join between two PostgreSQL database tables
executeSQLScriptExecute SQL script on PostgreSQL database
databaseImportOptionsDefine import options for database data
getoptionsRetrieve import options for database data
previewPreview eight rows from database using import options
setoptionsCustomize import options for database data
resetReset to default import options for database data
databaseDatastoreDatastore for data in database
hasdataDetermine if data in DatabaseDatastore is available to read
previewReturn subset of data from DatabaseDatastore
readRead data in DatabaseDatastore
readallRead all data in DatabaseDatastore
resetReset DatabaseDatastore to initial state
splitsqlquerySplit SQL query using paging
createConnectionForPoolInitialize parallel pool using database connection
sqlwriteInsert MATLAB data into PostgreSQL database table
executeExecute SQL statement using PostgreSQL native interface database connection
commitMake changes to PostgreSQL database permanent
rollbackUndo changes to PostgreSQL database
sqlupdateUpdate rows in PostgreSQL database table

Topics

Configure PostgreSQL Native Interface

Import Data into MATLAB

Export Data from MATLAB

Execute Database Operations

Deploy Standalone Database Application