Selecting rows by content of array type field

Поиск
Список
Период
Сортировка
От mito
Тема Selecting rows by content of array type field
Дата
Msg-id h612si$2fkq$1@news.hub.org
обсуждение исходный текст
Ответы Re: Selecting rows by content of array type field
Список pgsql-general
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 ON messages (recepients);

or is there other way how to index this? Expressions?

Thanks

В списке pgsql-general по дате отправления:

Предыдущее
От: kbarnard@kevinbarnard.net
Дата:
Сообщение: Index utilization
Следующее
От: arsi@archie.netg.se
Дата:
Сообщение: Encoding question when dumping/restoring databases for upgrade