By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

varchar_pattern_ops in 7.3.4?

P: n/a
I'd like to be able to do queries like "select count(*), fromline from
message where subject like 'Couldn%'" quickly. I see that, in current
Postgres, I can do this with an index like "create index message_subject
on message using btree(subject varchar_pattern_ops)". But I'm using
Postgres 7.3.4, and it doesn't seem to have varchar_pattern_ops in its
pg_opclass.opcname. Is there an easier way to do these queries than
upgrading?

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 21 Jan 2004, Kragen Sitaker wrote:
I'd like to be able to do queries like "select count(*), fromline from
message where subject like 'Couldn%'" quickly. I see that, in current
Postgres, I can do this with an index like "create index message_subject
on message using btree(subject varchar_pattern_ops)". But I'm using
Postgres 7.3.4, and it doesn't seem to have varchar_pattern_ops in its
pg_opclass.opcname. Is there an easier way to do these queries than
upgrading?


The only way to make that version work well here is to dump your database,
reinitdb with --locate=C and reimport your data. Then the indexes can be
used without having to have varchar_pattern_ops.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #2

P: n/a
On Wed, Jan 21, 2004 at 04:54:26PM -0700, scott.marlowe wrote:
On Wed, 21 Jan 2004, Kragen Sitaker wrote:
... subject like 'Couldn%'" ... But I'm using Postgres 7.3.4, and
it doesn't seem to have varchar_pattern_ops in its pg_opclass.opcname. ...


The only way to make that version work well here is to dump your database,
reinitdb with --locate=C and reimport your data. Then the indexes can be
used without having to have varchar_pattern_ops.


Thank you very much! (I assume you mean --locale=C, not --locate.)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.