Regular expression and array - Mailing list pgsql-general

From Nick
Subject Regular expression and array
Date
Msg-id 196461c6-0486-4e29-bb84-3996d024a080@z16g2000prd.googlegroups.com
Whole thread Raw
Responses Re: Regular expression and array  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
I wont go into details about why im using this field as an array but
how would I select all the rows that have the first name 'Tom' out of
the 'names' field?

CREATE TABLE test (
    id integer,
    names character varying[]
);
INSERT INTO test VALUES (1, '{"''Josh Berkus''","''Peter
Eisentraut''","''Marc Fournier''"}');
INSERT INTO test VALUES (2, '{"''Tom Lane''","''Bruce
Momjian''","''Dave Page''"}');
INSERT INTO test VALUES (3, '{"''Jan Wieck''","''Oleg
Bartunov''","''Joe Conway''"}');

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: How to speed up the first-time-searching in pgsql?
Next
From: Iv Ray
Date:
Subject: a strange error