# HG changeset patch # User Martin van Dinther <martin.van.dinther@monetdbsolutions.com> # Date 1582127424 -3600 # Node ID eabbc5bf7cdbedaa5fae496aba2d783c2920717a # Parent 69803e5a5a49edd1af6c08a3c2ba816600e8c3e4 Corrected the return value of getCatalogTerm(); diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Wed Feb 19 2020 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> +- Corrected the return value of getCatalogTerm() to "cat". + * Wed Feb 12 2020 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - As Java 7 is no longer supported we now compile for Java 8 as the minimum required JVM version (profile compact2). diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -953,14 +953,21 @@ public class MonetDatabaseMetaData /** * What is the database vendor's preferred term for "catalog"? - * MonetDB doesn't really have them (from driver accessible) but - * from the monetdb.conf file the term "database" sounds best + * + * MonetDB doesn't support the SQL catalog naming concept. + * Only SQL schemas are supported. + * We also do not allow the name of a database to be included in + * a fully qualified name, so we shouldn't return "database" here. + * A database is a different concept than an SQL catalog. * * @return the vendor term */ @Override public String getCatalogTerm() { - return "database"; + // MonetDB does NOT support catalogs, so also no catalog term + // Some generic SQL clients (e.g. DbVisualiser) use this string in their GUI + // To avoid NPE, just return an abrev string: "cat" (we like cats) + return "cat"; } /**