Prefix operator for text and spgist support

From: Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Prefix operator for text and spgist support
Date: 2018-02-02 15:03:27
Message-ID: 20180202180327.222b04b3@wp.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attached patch introduces prefix operator ^@ for text type. For 'a ^@ b'
it returns true if 'a' starts with 'b'. Also there is spgist index
support for this operator.

It could be useful as an alternative for LIKE for 'something%'
templates. Or even used in LIKE queries instead of ~>=~ and ~<~ in the
future. But it would require new strategy for btree.

--
---
Ildus Kurbangaliev
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

Attachment Content-Type Size
prefix_operator_and_spgist.patch text/x-patch 13.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-02-02 15:12:44 Re: [HACKERS] [PATCH] Lockable views
Previous Message Robert Haas 2018-02-02 14:33:29 Re: [HACKERS] path toward faster partition pruning