473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

varchar_pattern_ops in 7.3.4?

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
2 2017
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Dima Tkach | last post by:
Hi, everybody! I just ran into a weird problem on 7.3.4. Here is a simple testcase: rapidb=# create table nametab (name text); CREATE TABLE rapidb=# create index name_idx on nametab(name);...
10
by: David Garamond | last post by:
Reading the archives and the FAQ, it seems to be implied that LIKE can use index (and ILIKE can't; so to do case-insensitive search you need to create a functional index on LOWER(field) and say:...
10
by: John Sidney-Woollett | last post by:
Priem, Alexander said: > I recreated my entire database (luckily I keep scripts for > table/index/view > creation) and initdb-ed it using --lc-collate=C --encoding=UNICODE. In my > psqlODBC DSN...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.