[SR-Users] Use of mtree module having multiple trees in the same table

Iñaki Baz Castillo ibc at aliax.net
Tue Jun 14 14:27:53 CEST 2011


2011/6/13 jose luis millan <doctore96 at gmail.com>:
> I wonder if anyone could help me understanding how can I use this
> module in a scenario where multiple mtrees are defined behind the same
> database table.
>
> I can't guess how to speficy to 'mt_match' the mtree I want to match
> against, since the 'mtree' module parameter defines a specific memory
> tree based on a specific table, but not based on a specific 'tname'
> value.

Indeed we have a table with these colums:

- prefix:    string to identify number destination. This is the regex column.
- id_zone:  integer, points to other table. This is the value column.
- scope:    integer, can be 0 or 1.

So wee need two instances of mtree:
1) those rows with scope 0.
2) those rows with scope 1.

Is it possible with current mtree module? or maybe we'd do better by
creating two views of the table (one for entries with scope 0 and
another for entries with scope 1)?

Thanks a lot.

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list