selecting using WHERE on arrays

Поиск
Список
Период
Сортировка
От Adam Lowry
Тема selecting using WHERE on arrays
Дата
Msg-id 01022422302700.02650@rogueleader.rogue.net
обсуждение исходный текст
Ответ на Re: Win32 Client Tools  ("Rob Arnold" <rob@cabrion.com>)
Список pgsql-novice
Hello, I'm getting ramped up on pgsql, and so far the documentation has
helped wonderfully on everything but this problem.

Is it possible to perfom a select query where that will return any row that
contains a particular value in an attribute array? That does't sound very
clear. What I'm trying to do is something like this (to use a music album
analogy):

in a table ALBUM we'd have:
name text, etc
artist integer[] - where these integers are foreign keys into the artist
table.

what I'd like to do is:
select * from album where <artist index X is in artist array>;

Is this possible? All I've been able to do so far is select where a value = a
particular entry in the array ( [0] for example). Am I thinking about this
all wrong?

Thanks, Adam

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

Предыдущее
От: "Rob Arnold"
Дата:
Сообщение: Re: Win32 Client Tools
Следующее
От: Mike Friesen
Дата:
Сообщение: Mapping two table primary keys together