Re: Proposed new create command, CREATE OPERATOR CLASS

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Teodor Sigaev <teodor(at)stack(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bill Studenmund <wrstuden(at)netbsd(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed new create command, CREATE OPERATOR CLASS
Date: 2001-10-29 14:30:51
Message-ID: Pine.GSO.4.33.0110291729010.7830-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 25 Oct 2001, Teodor Sigaev wrote:

> >>Wait a second, how can you do that? Doesn't that violate
> >>pg_amop_opc_strategy_index ?
> >>
> >
> > It sure does, but running the script shows that the second insert
> > doesn't try to insert any rows. There's no entry in the temp table
> > for ~~ because its left and right operands are not the types the
> > SELECT/INTO is looking for.
> >
> > This is evidently a bug in the script. Oleg?
> >
>
>
> Make me right if I mistake.
>
> When we was developing operator @@, I saw that postgres don't use index in
> select if operation has not commutator. But operator with different types in
> argument can't be commutator with itself. So I maked operator ~~ only for
> postgres can use index access for operator @@. There is no any difficulties to
> adding index support for operator ~~. The same things is with contrib/tsearch
> module.
>
> But I think that there is not any other necessity in presence ~~.

Tom,

this is interesting question - do we really need commutator to get
postgres to use index. This is the only reason we created ~~ operator.

Regards,
Oleg
>
>
>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean K. Sell 2001-10-29 16:27:20 External Database Connection
Previous Message Vsevolod Lobko 2001-10-29 13:45:45 Re: Serious performance problem