Fancy SQL for insertion/retrival of include/exclude regexp rules