SELECT and Arrays

Поиск
Список
Период
Сортировка
От Barry Stinson
Тема SELECT and Arrays
Дата
Msg-id 500_6902_984524912_1@loganfoundation.org
обсуждение исходный текст
Список pgsql-general
<nl>
Hi all -
<nl><nl>

Trying to utilize an array within a table, and to SELECT it using the format [x:y]=something, but cant get it to
work...
<nl><nl>

Here is what I'm currently doing (the dumb way):
<nl><nl>

SELECT * FROM students WHERE testscore[1]>70 AND testscore[2]>70;
<nl><nl>

Here is what I'd like to do (the less dumb way;) ):
<nl><nl>

SELECT * FROM students WHERE testscore[1:2]>'{70,70}';
<nl><nl>

--------
<nl><nl>

However, PG keeps complaining about not finding an operator for types '_int4' and  'unknown'.
<nl><nl>

Anyone have any pointers??
<nl><nl>

Thanks,
Barry S

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

Предыдущее
От: will trillich
Дата:
Сообщение: Re: help with simple rule
Следующее
От: Franck Martin
Дата:
Сообщение: RE: Re: Data type for storing images?