db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre" <mcintyr...@gmail.com>
Subject Re: Show commands are not orthogonal
Date Thu, 19 Oct 2006 00:11:13 GMT
On 10/18/06, Øystein Grøvlen <Oystein.Grovlen@sun.com> wrote:
> Øystein Grøvlen wrote:
>
> > I will file a bug report for the documentation tomorrow.  The
> > documentation should proabably also say that system tables are only
> > displayed if a schema is specified.
>
> Thinking about this for another few minutes, this still means that the
> show commands are not orthogonal since by default system procedures and
> indexes on system tables are displayed, but not system tables.  So I'll
> ask again:  What do people think about this.

So, I went and looked at the code after this came up yesterday and I
believe that the original implementor may have thought it confusing to
issue show tables and get a list of all the system tables that weren't
in the current schema, especially if upon first connecting you don't
know what the current schema is.

But, because the table type for the system tables is SYSTEM TABLE, if
one issued the command 'show tables in sys' you would get nothing if
you just ask for the table type of TABLES. This led the original
implementor to only request SYSTEM TABLES if a schema was provided.

But, that decision in the code means if you 'set schema sys' and then
'show tables' you get no output. That's bad behavior, in my opinion.

> Should we fix this, and, if yes, in what way?

I've attached a patch which changes the behavior to adjust the
behavior of show tables to what you describe, and which also fixes the
problem I just found described above.

Try it out, and if you're satisfied with the behavior, I'll open a
JIRA for tracking for release purposes and then commit to trunk and
10.2.

andrew

Mime
View raw message