Default Operator Class for datatype

From: Jakub Królikowski <jakub(at)pakamera(dot)com(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: Default Operator Class for datatype
Date: 2011-05-06 13:42:47
Message-ID: BANLkTinH9fEmz-ME6XNQmZ+EsVajQPa6+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

No ideas?

2011/5/4 Jakub Królikowski <jakub(at)pakamera(dot)com(dot)pl>:
> Hello,
>
> I've set pl_PL.UTF-8 collation on my database after upgrade do 9.0.
> That means indexes for varchar column doesn't work anymore in selects
> using "like" or "=" operators with that columns.
> I know the solution - operator classes - which works very well.
> But that means I have to find and recreate all indexes on varchar
> column like this:
> CREATE INDEX test_index ON test_table (col varchar_pattern_ops);
>
> Does anybody know if there is any possibility to set a default
> operator class for varchar datatatype?
> I can see that in system table pg_catalog.pg_opclass ther is a column
> called "opcdefault". Does anybody has an experience with changing that
> value? The idea is to set this default operator class and make after
> that dump-restore of database data. Should work.
>
> Best regards,
>
> Jakub
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2011-05-06 13:51:37 Re: Growing a live database
Previous Message Rick Genter 2011-05-06 13:27:47 Growing a live database