Let's say I have an email with the tags 'inbox', 'unread', 'friend' and their tag id is 1,2,3. In my database I have something like
create email(emailID serial, header_data text, body text, tags int[])
I'd like to search my inbox for everything with tagid 2. The email I want will have the tags value as [1,2,3]. How do I create an index so this email is included? I'm using C# but I don't think that matters.