%% Find Information About Table Types Using PostgreSQL Native Interface
% Use a PostgreSQL native interface database connection to find information about all database table types in a PostgreSQL database.
%
% Create a PostgreSQL native interface database connection to a PostgreSQL database.

datasource = "PostgreSQLDataSource";
username = "dbdev";
password = "matlab";

conn = postgresql(datasource,username,password);

%
% Find information about all table types in the database.

data = sqlfind(conn,"");

% Display information about the first three table types.

head(data,3)

% data contains these variables:
% Catalog name
% Schema name
% Table name
% Columns in the table type
% Table type
%
% Close the database connection.

close(conn)

% Copyright 2020 The MathWorks, Inc.