Aaron, I'm still not sure I support the idea, but:
SELECT deliver_to FROM dbmail_aliases WHERE 'deliveryaddress' REGEXP alias; should work fine in MySQL, dunno if there's an equivilent statement in PG though. -Micah On Tuesday 19 October 2004 01:05 pm, Aaron Stone wrote: > Blake Mitchell <[EMAIL PROTECTED]> said: > > Why not take this one step further, and go with full glob or regex > > support? This would allow nearly any conceivable case. > > I don't know how we'd support this in the database. We'd use the alias > column of the dbmail_aliases table like this: > > alias | deliver_to > ------------------------------------- > [EMAIL PROTECTED] | 9 > [EMAIL PROTECTED] | [EMAIL PROTECTED] > [EMAIL PROTECTED] | 34 > ------------------------------------- > > Except that this doesn't work because, at least MySQL, cannot use the > REGEX keyword like this: > > SELECT deliver_to FROM dbmail_aliases WHERE '[EMAIL PROTECTED]' REGEX > alias; > > However... if we use SQL wildcards, you're in luck: > > alias | deliver_to > ------------------------------------- > [EMAIL PROTECTED] | [EMAIL PROTECTED] > > SELECT deliver_to FROM dbmail_aliases WHERE '[EMAIL PROTECTED]' LIKE > alias; > > Works perfectly. Could someone test PostgreSQL, too? This might solve > everything in one fell swoop... > > Aaron > > -- > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev