MATLAB: Am I unable to create an SSL connection to a database using Database Toolbox 3.0 (R14)

databaseDatabase Toolboxdriverlayeringpostgresqlsecuresocketssl

When I try to connect to my database using a JDBC driver and an SSL interface with the following command:
conn = database('dbname','username','password','org.postgresql.Driver','jdbc:postgresql:servername:dbname:ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory');
I receive the following error:
SSL Socket Factory Class org.postgresql.ssl.NonValidatingFactoryusername could not be instantiated

Best Answer

This enhancement has been incorporated in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This error may be caused by incorrect syntax. When using the DATABASE command with additional variables in the URL, be sure to append an ampersand (&) to the end of the URL as shown in this example:
conn = database('dbname','username','password','org.postgresql.Driver','jdbc:postgresql:servername:dbname:ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&');