Обсуждение: Can't find documentation for ~=~ operator

Поиск
Список
Период
Сортировка

Can't find documentation for ~=~ operator

От
Viktor Rosenfeld
Дата:
Hi,

I can't find the documentation of the ~=~ operator anywhere on the
PostgreSQL homepage.  I'm quite certain that I saw it there a while ago,
though.

FYI, I use ~=~ for equality checks, so I can use the same index for
equality and regexp pattern matching on a varchar field.  The index is
built with varchar_pattern_ops.

Cheers,
Viktor

Re: Can't find documentation for ~=~ operator

От
Tom Lane
Дата:
Viktor Rosenfeld <listuser36@googlemail.com> writes:
> I can't find the documentation of the ~=~ operator anywhere on the
> PostgreSQL homepage.

Which version's documentation are you reading?  It's gone as of 8.4.

> FYI, I use ~=~ for equality checks, so I can use the same index for
> equality and regexp pattern matching on a varchar field.  The index is
> built with varchar_pattern_ops.

Use plain old '=' as of 8.4.

            regards, tom lane

Re: Can't find documentation for ~=~ operator

От
Viktor Rosenfeld
Дата:
Tom Lane wrote:

> Viktor Rosenfeld <listuser36@googlemail.com> writes:
> > I can't find the documentation of the ~=~ operator anywhere on the
> > PostgreSQL homepage.
>
> Which version's documentation are you reading?  It's gone as of 8.4.

I realize that, but I have to use 8.3 right now and can't find it in
that manual either.

The only hit for ~=~ when searching the docs of 8.2, 8.3 and 8.4 is the
following link:

http://archives.postgresql.org/pgsql-hackers/2006-12/msg00477.php

When I search for xxx_pattern_ops (which, if my memory is correct, was
part of the page that described ~=~) I get section 11.9 (Operator
Classes and Operator Families) as a hit, but that page doesn't contain a
table of operators either.

Cheers,
Viktor