SELECT and Arrays - Mailing list pgsql-general

From Barry Stinson
Subject SELECT and Arrays
Date
Msg-id 500_6902_984524912_1@loganfoundation.org
Whole thread Raw
List 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 by date:

Previous
From: will trillich
Date:
Subject: Re: help with simple rule
Next
From: Franck Martin
Date:
Subject: RE: Re: Data type for storing images?