Обсуждение: To do list for DatabaseMetaData

Поиск
Список
Период
Сортировка

To do list for DatabaseMetaData

От
Peter Eisentraut
Дата:
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@gmx.net   http://funkturm.homeip.net/~peter


Re: To do list for DatabaseMetaData

От
Bruce Momjian
Дата:
Added to TODO.detail/java.  Thanks.

> 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@gmx.net   http://funkturm.homeip.net/~peter
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026