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
connection | PostgreSQL native interface database connection (Since R2020b) |
SQLConnectionOptions | Define PostgreSQL native interface database connection options (Since R2020b) |
Functions
Topics
Configure PostgreSQL Native Interface
- Configure PostgreSQL Native Interface Data Source
Configure a PostgreSQL native interface data source for a PostgreSQL database on Windows®.
Import Data into MATLAB
- Import Data from PostgreSQL Database Table
Import data from one table in a PostgreSQL database by using various functions. - Customize Options for Importing Data from PostgreSQL Database into MATLAB
Customize import options for multiple variables when importing data from a database. - Import Large PostgreSQL Data Using DatabaseDatastore Object
Create aDatabaseDatastore
object for accessing collections of data stored in a PostgreSQL database.
Export Data from MATLAB
- Insert Data into Database Table Using PostgreSQL Native Interface
Perform calculations on data and insert the results into a PostgreSQL database using thesqlwrite
function.
Execute Database Operations
- Create Table and Add Column Using PostgreSQL Native Interface
Manage database structures using theCREATE
andALTER
SQL statements in a PostgreSQL database. - Delete Data from Database Using PostgreSQL Native Interface
Delete data from a PostgreSQL database using the SQLDELETE
statement. - Roll Back Data in Database Using PostgreSQL Native Interface
Roll back data after inserting data into a table in a PostgreSQL database.
Deploy Standalone Database Application
- Deploy PostgreSQL Native Interface Database Application with MATLAB Compiler
Write a MATLAB script that connects to a PostgreSQL database, and deploy the script as a standalone database application to other machines.