Re: [GENERAL] Selecting rows by content of array type field

2009-08-13 Thread Sam Mason
On Thu, Aug 13, 2009 at 04:02:14PM +0300, mito wrote: > I have table like this: > CREATE TABLE messages { > recepients varchar[], > }; > > Want to select by content co array type field recepients: > SELECT * FROM messages where 'john' ANY (recepients); not sure if it went missing in the ema

[GENERAL] Selecting rows by content of array type field

2009-08-13 Thread mito
I have table like this: CREATE TABLE messages { recepients varchar[], }; Want to select by content co array type field recepients: SELECT * FROM messages where 'john' ANY (recepients); If i want to create index on recepients field, is it enough to CREATE INDEX messages_recepients_index