To do list for DatabaseMetaData

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: To do list for DatabaseMetaData
Date: 2001-07-08 22:55:37
Message-ID: Pine.LNX.4.30.0107090041240.677-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Since DatabaseMetaData seems to have been a subject of interest lately I
have composed a list of concrete things that need to be done there.

The spec of DatabaseMetaData is here:
http://java.sun.com/j2se/1.3/docs/api/java/sql/DatabaseMetaData.html

All the functions listed in the spec and not listed below I have recently
checked and updated for correctness and compliance. Thus, this list is
complete. Functions marked with '?' I have not checked yet.

If someone wants to tackle some of the getThings() functions, a
description of the system catalogs is in the Developer's Guide. Also note
that some functions currently incorrectly handle the case of null patterns
vs. "" patterns vs. "%" patterns.

At least two parameters obtained by a DatabaseMetaData method are
user-tunable on the server side. The only way to get at those numbers
currently is to use SHOW and parse the NOTICE: it sends back (which is
impossible in the days of internationalized messages), so a nice
side-project would be to implement a get_config_variable(text) returns
text (better names possible) function to allow easier access.

Now the list:

allProceduresAreCallable() not all procedures listed are
callable (triggers, in/out)
allTablesAreSelectable() should this check access
privileges or what?
getSQLKeywords() outdated, could be automated like
keywords.sgml
getNumericFunctions() decide what exactly is a "numeric function"?
getStringFunctions() ditto
getSystemFunctions() ditto
getTimeDateFunctions() ditto
getExtraNameCharacters() server allows \200 to \377, how
does this fit in with Unicode?
getMaxColumnNameLength() 32 is hard-coded here, maybe query server
getMaxColumnsInIndex() this should be detected from server
getMaxColumnsInTable() this limit is probably shaky
getMaxConnections() could query the server for this
(SHOW, see above)
getMaxCursorNameLength() 32 hard-coded
getMaxSchemaNameLength() will be 32 when done
getMaxProcedureNameLength() 32 hard-coded
getMaxCatalogNameLength() should be NAMEDATALEN
doesMaxRowSizeIncludeBlobs() since we don't have blobs, should
this throw an exception?
getMaxStatements() questionable, see comment there
getMaxTableNameLength() 32 hard-coded
getMaxUserNameLength() 32 hard-coded
getDefaultTransactionIsolation() This is configurable in 7.2.
(SHOW, see above)
getProcedures() missing catalog (database) and
remarks columns
getProcedureColumns() only dummy implementation
getTables() fails to handle pre-7.1 servers
(relkind 'v')
getSchemas() This should throw an exception.
getTableTypes() ?
getColumns() ?
getColumnPrivileges() not implemented
getTablePrivileges() not implemented
getBestRowIdentifier() only dummy implementation
getVersionColumns() not implemented
getPrimaryKeys() ?
getImportedKeys() ?
getExportedKeys() not implemented
getCrossReference() not implemented
getTypeInfo() ?
getIndexInfo() ?
getUDTs() ?

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2001-07-09 01:34:26 Re: DatabaseMetaData.getCatalogs()
Previous Message Ola Sundell 2001-07-08 22:19:21 UpdateableResultSets and concurrency.