[
https://issues.apache.org/jira/browse/DERBY-5441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kim Haase closed DERBY-5441.
----------------------------
Resolution: Duplicate
This issue was fixed by DERBY-5822.
> Misleading description of SYSCS_DIAG.SPACE_TABLE
> ------------------------------------------------
>
> Key: DERBY-5441
> URL: https://issues.apache.org/jira/browse/DERBY-5441
> Project: Derby
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0,
> 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2
> Reporter: Dag H. Wanvik
> Priority: Minor
>
> This method can take one or two arguments. If two arguments are provided the
> first should be the name of the SCHEMA, the second argument should be the
> name of the TABLE, in both cases in internal normal form, that is,
> capitalized unless the names were created as quoted identifiers.
> If the method takes only one argument, that argument should be the name of
> the TABLE. The schema will be taken to be the current default schema
> It is somewhat implicit in the docs that the table function can accept one or
> two arguments, I'd like this to be made clearer. In particular, doing
> something like:
> SELECT * from TABLE(SYSCS_DIAG.SPACE_TABLE('APP.FOO')) AS S;
> will not give the expected result, since this means the table APP."APP.FOO",
> which is less than obvious.
> Also, this sentence of description is wrong, in my view:
> "For example, use the following query to return the space usage for all
> of the user tables and indexes in the database:
>
> SELECT T2.*
> FROM
> SYS.SYSTABLES systabs,
> TABLE (SYSCS_DIAG.SPACE_TABLE(systabs.tablename)) AS T2
> WHERE systabs.tabletype = 'T'
>
> where T2 is a user-specified table name that is any valid identifier."
> Note "all the user tables and indexes in the database". The correct statement
> would be "all the tables and indexes in the current default schema".
> If one wanted *all* user tables, the query would be:
> SELECT T2.*
> FROM
> SYS.SYSTABLES systabs,
> sys.sysschemas sysschemas,
> TABLE (SYSCS_DIAG.SPACE_TABLE(sysschemas.schemaname,
> systabs.tablename)) AS T2
> WHERE systabs.tabletype = 'T' and systabs.schemaid =
> sysschemas.schemaid;
--
This message was sent by Atlassian JIRA
(v6.1#6144)