Re: [SQL] arrays - Mailing list pgsql-general

From Tom Lane
Subject Re: [SQL] arrays
Date
Msg-id 21137.1033396928@sss.pgh.pa.us
Whole thread Raw
Responses Re: [SQL] arrays
List pgsql-general
Mike Sosteric <mikes@athabascau.ca> writes:
> could you select where title[0] = 'en'

You certainly could ... but bear in mind that there's no convenient way
to make such a query be indexed, at present.  So any values that you
actually want to use as search keys had better be in their own fields.

Now, if you are just using this as an extra search condition that picks
one row out of a small number that are identified by another WHERE
clause, then it's good enough to index for the other clause, and so the
lack of an index for title[0] isn't an issue.  In this case, with only
a small number of possible values for title[0], it seems that an index
wouldn't be helpful anyway.

            regards, tom lane

pgsql-general by date:

Previous
From: Adam Witney
Date:
Subject: Re: Beta2 - A Late Announcement
Next
From: Tom Lane
Date:
Subject: Re: Beta2 - A Late Announcement