Search found 124 matches
- Sat Mar 26, 2016 5:15 pm
- Forum: Language Issues
- Topic: Allowing <statement list> in places where TD grammar requires <statement>
- Replies: 5
- Views: 14101
Allowing <statement list> in places where TD grammar requires <statement>
Chris Date is urging me to change the grammar for operator definitions, replacing <statement> (for the operator body) by <statement list>. He doesn't like having always to enclose multiple statements in a BEGIN/END pair. I'm saying that if we do that for operator definitions we should also do it for...
- Sat Mar 26, 2016 5:03 pm
- Forum: Language Issues
- Topic: possreps for system-defined types
- Replies: 4
- Views: 12168
Re: possreps for system-defined types
Thanks, Dave. Yes, the IM extensions to Tutorial D allow INTEGER > 0 as the specialisation constraint. I was aware of the general problem concerning literals and gave up the idea of defining subtypes of INTEGER a long time ago. I gave that example only because the IM extensions to Tutorial D require...
- Thu Mar 10, 2016 5:29 pm
- Forum: Language Issues
- Topic: possreps for system-defined types
- Replies: 4
- Views: 12168
possreps for system-defined types
I very much like Rel's support for selector invocations denoting values of system-defined types. For example INTEGER(-1) and BOOLEAN(TRUE) are equivalent to the literals -1 and TRUE, respectively. I also like the fact that such invocations can be nested, as in INTEGER(INTEGER(-1)) and so on, ad infi...
- Sun Feb 08, 2015 5:00 pm
- Forum: Report a Bug
- Topic: Aggregate union on empty relation gives error
- Replies: 1
- Views: 7724
Aggregate union on empty relation gives error
UNION (RELATION {x RELATION {y INT}} {}, x)
The above expression gives:
ERROR: RS0263: Result of UNION on no values is undefined.
Line 1, column 42 near 'x'
It should give RELATION {y INT}} {}.
Hugh
The above expression gives:
ERROR: RS0263: Result of UNION on no values is undefined.
Line 1, column 42 near 'x'
It should give RELATION {y INT}} {}.
Hugh
- Sun Jun 22, 2014 4:05 pm
- Forum: Report a Bug
- Topic: Type-incompatible comparisons accepted
- Replies: 1
- Views: 7925
Type-incompatible comparisons accepted
Comparisons of tuple expressions of different types and comparisons of expressions of different user-defined scalar types are sometimes accepted instead of giving type errors, as the script below shows. I also tried the comparison t4(10, 20) < t6(10, 'abc') and that caused Rel to crash. tuple{x 1} =...
- Tue Jun 17, 2014 3:01 pm
- Forum: Report a Bug
- Topic: Shouldn't JOIN { } return DEE ?
- Replies: 5
- Views: 11582
Re: Shouldn't JOIN { } return DEE ?
Further to my reply just posted, I've just come across the point in my book where n-adic tuple join is indeed defined. But we didn't even have that in TD/V1, so my book has been in error all this time. Deepest apologies!
Hugh
Hugh
- Tue Jun 17, 2014 2:52 pm
- Forum: Report a Bug
- Topic: Incorrect syntax for GROUP, UNGROUP, WRAP, UNWRAP
- Replies: 1
- Views: 7284
Incorrect syntax for GROUP, UNGROUP, WRAP, UNWRAP
It seems that Rel still uses V1 syntax for these operators. In TD/V2 we removed the parens and withdrew support for multiple groupings, ungroupings, wrappings and unwrappings. Thus, e.g., GROUP {a,b} AS c rather than GROUP ({a,b} AS c). I hope this problem can be fixed fairly soon, because soon I wa...
- Tue Jun 17, 2014 2:46 pm
- Forum: Report a Bug
- Topic: Shouldn't JOIN { } return DEE ?
- Replies: 5
- Views: 11582
Re: Shouldn't JOIN { } return DEE ?
Tutorial D grammar doesn't include <n-adic tuple join>, so JOIN { } has to be a relation join, yielding DEE. What about UNION { }? That has to be an <n-adic tuple union> because if it were a relation union it would need a heading to be specified. But apparently Rel doesn't yet support UNION { }, wh...
- Wed Nov 20, 2013 2:20 pm
- Forum: Discussion
- Topic: A plug for Rel
- Replies: 1
- Views: 8502
A plug for Rel
One of my (almost) lifelong hobbies has given rise to my website http://www.doubledummy.net, where people who play the game of bridge can solve puzzles that I set. Successful solvers of a problem get a number of points towards their life record, according to the adjudged difficulty of the problem. S...
- Wed Nov 20, 2013 2:06 pm
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
Good news! In the mean time I've been using a bypass, based on the distinction Tutorial D makes between INSERT and D_INSERT. It occurred to me that R := s UNION R is equivalent to INSERT R s , where D_INSERT R s might fail. I'm so used to the behaviour of SQL INSERT that this solution hadn't occurre...
- Tue Nov 05, 2013 5:00 pm
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
I have discovered a much easier way to recreate the problem with rising CreationSequence values. Start DBrowser with a brand new database. VAR ab base rel{a int, b int} key{a}; then: (sys.Catalog where Owner = 'User'){Name, CreationSequence} gives 106 as the CreationSequence value for ab. Now: ab :=...
- Wed Oct 23, 2013 9:41 am
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
I can now report that on my "production" database the CreationSequence value for base relvar Usage is rising by a small amount after every execution of that multiple assignment. On test databases (copies) the symptoms have been slightly different, sometimes involving two base relvars and s...
- Sun Oct 20, 2013 5:13 pm
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
It appears that I've been mistaken yet again. When my constraint is as I wrote on October 16: CASE WHEN COUNT ( UsageThisMonth ) < 2 THEN TRUE ELSE ( Gb from tuple from ( UsageThisMonth where Day = max ( UsageThisMonth where Day < max ( UsageThisMonth , Day ) , Day ) ) ) <= ( Gb from tuple from ( Us...
- Wed Oct 16, 2013 2:15 pm
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
I think I must apologise. On close inspection, my constraint includes the expression "UsageThisMonth where Day = max ( UsageThisMonth where Day < max ( UsageThisMonth , Day ) , Day )". The subexpression in bold yields an empty relation when UsageThisMonth has cardinality 1, as it does as a...
- Tue Oct 15, 2013 11:50 am
- Forum: Report a Bug
- Topic: WIBNIs re error messages and backup
- Replies: 15
- Views: 481043
Re: WIBNIs re error messages and backup
On reflection, I think item 1 is a bug after all. I obtained the following output from the database I sent you but with the constraint ReadingsAscend replaced by the definition shown (note that I have only that one constraint apart from key constraints): sys.Constraints RELATION {Name CHARACTER, Def...