Re: Prefix operator for text and spgist support

Teodor Sigaev <teodor@sigaev.ru>

From: Teodor Sigaev <teodor@sigaev.ru>
To: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>, Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-03-22T16:09:10Z
Lists: pgsql-hackers

Attachments

Hi!

Patch looks resonable, but I see some place to improvement:
spg_text_leaf_consistent() only needs to check with text_startswith() if 
reconstucted value came to leaf consistent is shorter than given prefix. For 
example, if level >= length of prefix then we guarantee that fully reconstracted 
is matched too. But do not miss that you may need to return value for index only 
scan, consult returnData field

In attachment rebased and minorly edited version of your patch.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Commits

  1. Add prefix operator for TEXT type.