In article <AANLkTims+x5BpfAXF+9_cOHiaGa7=B_NpN=hw99kGxsK@xxxxxxxxxxxxxx>, Marcelo de Moraes Serpa <celoserpa@xxxxxxxxx> writes: > Some good souls hinted me at the prefix extension, but > how would I use it? Like this: CREATE TABLE users ( id serial NOT NULL, name text NOT NULL, reversed_domain prefix_range NULL, PRIMARY KEY (id) ); CREATE INDEX users_dom_ix ON users USING gist (reversed_domain); SELECT id, name, reversed_domain FROM users WHERE reversed_domain @> 'com.app.mycompany'; -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general