Thanks, that works.

There is a problem with using ** and *+ in the Reads__ command though:

I.e.
Insert__db 'uniquemtpair';<'A';'B'

   Reads__db 'from uniquemtpair' NB. works
┌──┬──┐
│v1│v2│
├──┼──┤
│A │B │
└──┴──┘
     Reads__db '** from uniquemtpair' NB. should give 'A';'B'
┌────────────┬────────────┐
│mytype.value│mytype.value│
├────────────┼────────────┤
│A           │A           │
└────────────┴────────────┘

     Reads__db '*+ from uniquemtpair' NB. should give 'A';'B'
┌────────────┬────────────┐
│mytype.value│mytype.value│
├────────────┼────────────┤
│A           │A           │
└────────────┴────────────┘

On Wed, Dec 31, 2008 at 6:04 AM, Chris Burke <[email protected]> wrote:
> Chris Burke wrote:
>> Matthew Brand wrote:
>>> I have written a couple of emails about this JDB bug but was not too
>>> sure if it was a bug or just my lack of understanding. I think the
>>> output below shows very clearly that there is definitely a bug when
>>> trying to make a compound primary key whose columns reference another
>>> table. The code below results in duplicate values in a table which
>>> should only contain unique rows.
>>>
>>> The fact that at the end of the script the Reads__ command does not
>>> report row 'A';'B' as being in the table, but that further attempts to
>>> Insert__ 'A';'B' fail with duplicate key error might give a hint as to
>>> where the problem is. Insert__ might be doing the correct thing but it
>>> might be using Reads__ somewhere to find what is in the table already.
>>> It might be Reads__ that is not be working correctly.
>>
>> Thanks for the detailed report. I see the problem (with Reads, not
>> Insert) and hope to get a fix out tomorrow.
>
> This bug is fixed now. I also made a related change - a scalar value for
> a varchar type is now raveled to a 1-element list.
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to