db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1520) Document new SYSCS_DIAG tables
Date Fri, 23 Mar 2007 17:47:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483674

A B commented on DERBY-1520:

> But if non-delimited identifiers are not that common, then it would be beneficial to
show a
> different example, one without caps and quotation marks.

Ah, I see.  That's a good idea.  But the example as it was--i.e.:


was incorrect because "myspacetable" is not a valid expression in the context of this query.
If we assume that the intent is to have a scenario where we have delimited identifiers, then
the correct query is:

    FROM TABLE (SYSCS_DIAG.SPACE_TABLE('myspacetable')) 

i.e. the argument still has to be a string literal (and thus the quotes are required).  The
only difference is that you wouldn't
need to put the name in upper-case.  But if you use that example then you should make sure
to explicitly state that when "myspacetable" was created it was created with delimiters around
its name, ex:

  create table "myspacetable" (i int)                -- note the double-quotes as delimiters

If you want an example that does not use string literals (and thus no single quotes are required),
you have to specify some non-literal expression which is valid in the context of the query
and whose type maps to Java string.  Once such example would be:

       SYS.SYSTABLES systabs,
       TABLE (SYSCS_DIAG.SPACE_TABLE(systabs.tablename)) AS T2
    WHERE systabs.tabletype = 'T'

which will return the space usage for all user tables (and indexes) in the database.  This
might be a good example to give since it sounds like something a user might actually want
to do...But I'll leave that up to you.

On a completely different note, I noticed that the latest patch is missing a space before
"tableName" in the following sentence under SYSCS_DIAG.SPACE_TABLE:

  This diagnostic table function takes two arguments, the schemaName and thetableName.

> Document new SYSCS_DIAG tables
> ------------------------------
>                 Key: DERBY-1520
>                 URL: https://issues.apache.org/jira/browse/DERBY-1520
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions:
>            Reporter: Stan Bradbury
>         Assigned To: Laura Stewart
>         Attachments: derby1520_1.diff, derby1520_2.diff, derby1520_3.diff, derby1520_4.diff,
derby1520_5.diff, derby1520_6.diff, refderby.ditamap, rrefsyscsdiagtables.html, rrefsyscsdiagtables.html,
rrefsyscsdiagtables.html, rrefsyscsdiagtables.html
> See comments for DERBY-571 for initial documentation discussion.  The new tables (mapped
to the old Diagnostic VTIs) are:
> The old style syntax will remain in place for 10.2, but become deprecated.
> The tables to be implemented in this change are:
> SYSCS_DIAG.LOCK_TABLE replaces org.apache.derby.diag.LockTable
> SYSCS_DIAG.STATEMENT_CACHE replaces org.apache.derby.diag.StatementCache
> SYSCS_DIAG.TRANSACTION_TABLE replaces org.apache.derby.diag.TransactionTable
> SYSCS_DIAG.ERROR_MESSAGES replaces org.apache.derby.diag.ErrorMessages 
> The information about the tables can be found in the javadoc for the class listed above.
> That can be found at:
> http://db.apache.org/derby/javadoc/engine/
> click on the org.apache.derby.diag link in the Packages table, then select each class,
e.g. LockTable to see the info.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message