db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susan L. Cline" <home4...@pacbell.net>
Subject Re: dblook and lower-case table names created with double-quotes, doc bug or "bug" bug?
Date Wed, 06 Sep 2006 22:33:06 GMT
--- "Susan L. Cline" <home4slc@pacbell.net> wrote:
> --- Army <qozinx@gmail.com> wrote:
> > Susan Cline wrote:
> > > In reviewing the dblook examples in the Tools and Utilities Guide:
> > >  
> > > http://db.apache.org/derby/docs/dev/tools/rtoolsdblookexamples.html
> > >  
> > > I noticed the output from using the -t flag with  dblook to specify
> > > a particular  table created using lower case names and double-quotes
> > > is inconsistent when creating tablenames in upper case and double-
> > > quoting the name.
> > 
[ snip ]
> > If you think specific examples of using quotes/spaces would be more helpful than

> > confusing, you should certainly feel free to add them!
> 
> Thanks for the demonstration Army, and the history.  I can see why this would be confusing
to
> document.
> 
> >  > Is this a doc bug or a bug in the code?
> > 
> > I would say "doc bug", but that does't mean the examples are wrong.  Instead, we

> > should probably add a note to the documentation explaining that the quotes shown

> > in the examples are *part* of the argument and need to be passed to dblook; how

> > that happens depends on the command-line being used.  Then, as mentioned above,

> > if anyone thinks some specific examples would be helpful, then s/he/they should

> > definitely follow-up to get some examples into the doc...
> 
> Agreed - I think either we make a note to the effect above and give at least one example,
or we
> remove the entire example that uses a table with quotes.
> 

How do you think this sounds to replace the two existing examples where the two -t "My Table"
examples are shown?

Replace this:

Dump the DDL for all objects with schema 'SAMP' in database 'sample' that are related to the
table
name 'My Table' to the console. 

java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t "My Table".  

With this:
Dump the DDL for all objects with schema 'SAMP' in database 'sample' that are related to the
table
name 'My Table' to the console.  

The quotes shown for the table argument are part of the argument and need to be passed to
dblook.
Escaping these quotes depends on the command line being used.   

For instance on a Windows command line the command make take this form:
java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t "\"My Table\"".  

Using the C-shell on a Linux platform may require this command: 
java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t '"My Table"'.

---------------------------------------------------------------------------------

For the second example, replace this:

Dump the DDL for all objects in database 'sample' that are related
to either of the table names 'STAFF' or 'My Table' to the console.
java org.apache.derby.tools.dblook -d jdbc:derby:sample -t "My Table" staff

With this:
Dump the DDL for all objects in database 'sample' that are related
to either of the table names 'STAFF' or 'My Table' to the console.

The quotes shown for the table argument are part of the argument and need to be passed to
dblook.
Escaping these quotes depends on the command-line being used.   

For instance on a Windows command line the command make take this form:
java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t "\"My Table\"" staff

Using the C-shell on a Linux platform may require this command: 
java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t '"My Table"' staff

Thanks,

Susan


Mime
View raw message