Viktor Dukhovni writes:
> If someone specifies multiple maps, each map is given the same
> query. When only some of the maps produce a result, what should
> the final result be:
>
> - The result is "not found". This is may be desirable in some cases.
> Right now, the virtual(8) daemon queries three parallel tables
> for mailbox file name, uid and gid; it can't deliver mail unless
> all three are available. Maybe this will allow us to avoid
> introducing more parallel lookups in the future.
That would be more like a traditional join, but we don't have a
way to disambiguate the various result columns. I think that users
who really want this should use SQL! So my "vote" is "no" on this
one.
A (far-fetched, I admit) functionality for this would be the ability to mask
out some of the keys in the first table. Like pipemap, but then using the
same lookup key for all queries, and returning either the first or the last
result. A logical AND.
Let's say you have all your email addresses in LDAP or AD, over which you
have no control, but you don't want to deliver mail for all of them. You
could then chain the LDAP table with another table containing all email
addresses for which you do want to deliver..
+1 for the "no"
> - The result contains empty fields for unavailable results. I have
> difficulty imagining where this would be desirable. Postfix
> currently has no concept of "tuples of results", and therefore
> has no concept that different tuple members might have different
> meanings. Again, the nearest thing is the virtual(8) daemon.
Not a fan of this either.
Neither am I.
> - The result is a concatenation of the available results, without
> indication of what maps produce "not found". I think this is what
> the current patch does, and this is OK for current Postfix.
This is why I think "union" is the right name, in an SQL union
there is no distinction in the result set between rows arising from
different underlying subtables.
True.
At least for functionality, this would have my preference / is what I need.
The decision about the name I leave to you.
Regards,
Roel