db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5441) Misleading description of SYSCS_DIAG.SPACE_TABLE
Date Fri, 27 Jul 2012 20:06:34 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424107#comment-13424107
] 

Kim Haase commented on DERBY-5441:
----------------------------------

I'm wondering if the work on DERBY-5822 has fixed the problems described in this issue? If
so, perhaps it could be linked to that issue and resolved as fixed.
                
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message