Subject Re: [Firebird-Architect] IN LIST
Author Jim Starkey
Adriano dos Santos Fernandes wrote:
> Jim Starkey wrote:
>
>> Personally, I haven't seen substantial case for ranges within an IN
>> LIST. Is it intended only as syntactic sugar, does it allow a user to
>> do something he or she otherwise couldn't do, or is a convenience construct?
>>
>>
> As said, there are others ways to handle it, but:
> 1) generating different statements as you said
> 2) inserting in a temp-table and the selecting or joining with the table
>
>
>> Once again, this is an example of solution presented without a problem.
>> If we knew what problem this statement was intended to solve, it would
>> be a great deal easier to evaluate it.
>>
>> Could we go back to the beginning with a clear statement of a system
>> requirement?
>>
>>
>
> I said... you that never understand things and go with this phrase...
>
> It's dependent from the user...
>
> Right now, I'm writing a IMAP server.
>
> The user is working in his email client, then he decides to select some
> messages.
> He selected all messages from 2006-01-01 to 2006-01-31 and select
> another message from 2006-07-01 and mark as read.
>
> The email client send to the server a list of message ids:
> 10000:11000,13000
>
> 10000 is id of message from 2006-01-01
> 11000 is id of message from 2006-01-31
> 13000 id id of message from 2006-07-01
>
I'm not convinced this is realistic, general, or important. In
specific, I think the idea that an email client is going to detect from
GUI that an inclusive range of artificially generated ideas is
appropriate. That's a pretty big special case. It may recognize that a
selection of messages by date makes sense, but not the id's.

Even so, why not a simple OR of a discrete list and a between? Even if
the optimizer doesn't presently handle the case, extending the optimizer
is a great deal simpler that what you have proposed.

Language extensions make sense to express something that couldn't
otherwise be expressed or to express something in a form that will
result in better performance. So far, I don't think you've met the test.
> But just think... This is a case use of well written applications that
> allows the user to filter things based on his need.
>
Sorry, I'm not yet convinced.