You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Myrna van Lunteren <m....@gmail.com> on 2006/06/13 02:44:35 UTC

-Dij. in doc should be -D ?

Hi,

I was poking at the manual and I noticed that in the following:
http://db.apache.org/derby/docs/10.1/tools/ttoolsij30600.html
it is described that you can overwrite ij properties specified with
the -p <propertyfile> by using -Dij.<property>.

However, when I tried it, it looks as you need to specify
-D<property>, if you use the -Dij.<property> nothing happens.

For instance, if you create a file, myij.properties with contents:
---------
ij.maximumDisplayWidth=5
---------
and then start ij with -p the Displaywidth is indeed 5 instead of the
default (80, I believe, but whatever)
------------------------------------------
java org.apache.derby.tools.ij -p myij.properties
[...snip version...]
ij> connect 'jdbc:db2j:bladb';
ij> select * from sys.systables where tablename like 'SYSCOLUMN%';
TABL&|TABL&|&|SCHE&|&
---------------------
8000&|SYSC&|S|8000&|R

1 row selected
------------------------------------------
If I use -Dij.maximumDisplayWidth=15, the result is the same, but if I
use -DmaximumDisplayWidth=15, the display width changes.
-------------------------

So...
------------------------------------------
java org.apache.derby.tools.ij -p myij.properties
[...snip version...]
ij> connect 'jdbc:db2j:bladb';
ij> select * from sys.systables where tablename like 'SYSCOLUMN%';
TABLEID        |TABLENAME      |&|SCHEMAID       |&
---------------------------------------------------
8000001e-00d0-&|SYSCOLUMNS     |S|8000000d-00d0-&|R
1 row selected
------------------------------------------


I assume this is intended behavior, and a doc bug...
Can anyone confirm whether or not this is true for all ij properties
by looking at the code?
(Or I'll need to go an test all properties). I tried (ij.)database and
(ij.)maximumDisplayWidth...

Thx,
Myrna

Re: -Dij. in doc should be -D ?

Posted by Andrew McIntyre <mc...@gmail.com>.
On 6/12/06, Myrna van Lunteren <m....@gmail.com> wrote:
> Hi,
>
> I was poking at the manual and I noticed that in the following:
> http://db.apache.org/derby/docs/10.1/tools/ttoolsij30600.html
> it is described that you can overwrite ij properties specified with
> the -p <propertyfile> by using -Dij.<property>.
>
> However, when I tried it, it looks as you need to specify
> -D<property>, if you use the -Dij.<property> nothing happens.
>
> </snip>
>
> I assume this is intended behavior, and a doc bug...
> Can anyone confirm whether or not this is true for all ij properties
> by looking at the code?

This sounds like a code bug, not a doc bug. I think that ij's
properties should all be prefixed with 'ij.' as described in the doc.
And the fact that a property with a different name, not prefixed with
'ij.', can override the behavior of the properly named property seems
really wrong to me.

Could you please file a code bug for this? I'll take a look at it shorty.

andrew