Re: How to overload POSITION

From: Troels Arvin <troels(at)arvin(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to overload POSITION
Date: 2004-11-16 21:12:53
Message-ID: pan.2004.11.16.21.12.53.350397@arvin.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 16 Nov 2004 15:56:00 -0500, Tom Lane wrote:

> [... cut advice ...]

Thanks.

> How wedded are you to being able to say "IN"?

It's only a would-be-nice-to-have.

My dnaseq data type exploits the fact that DNA sequences are made from a
very small alphabet (four characters), so strings can be compressed/packed
4:1 while still being directly usable. A POSITION(dnaseq IN dnaseq) would
mean that the dnaseq-values don't have to be converted to text before
being searched.

But I can live with my existing DNASEQ_POSITION(dnaseq,dnaseq) solution
(which works directly on the dnaseq packed strings).

(I will also try to create a specialized index for long strings, hopefully
using some substring array algorithmics - but that's another story.)

--
Greetings from Troels Arvin, Copenhagen, Denmark

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Timothy Perrigo 2004-11-16 21:54:09 Re: question about temp table in function
Previous Message Tom Lane 2004-11-16 20:56:00 Re: How to overload POSITION