From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Prefix operator for text and spgist support |
Date: | 2018-03-22 16:09:10 |
Message-ID: | e71b4911-7cd0-fd6f-29c8-95225c3beb11@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
Attachment | Content-Type | Size |
---|---|---|
prefix_operator_and_spgist_v4.patch | text/x-patch | 15.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-03-22 16:19:49 | Re: Error detail/hint style fixup |
Previous Message | Pavel Stehule | 2018-03-22 15:57:30 | Re: Re: csv format for psql |