pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
To: Emre Hasegeli <emre@hasegeli.com>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Prefix operator for text and spgist support
Date: Mon, 16 Apr 2018 15:50:36 +0300
Message-ID: <20180416155036.36070396@wp.localdomain> (raw )
In-Reply-To: <CAE2gYzw0i2ejZrS5y2-PVbe7qBE3deNAC1dLaFT75hNEgxZRUA@mail.gmail.com >
References: <20180202180327.222b04b3@wp.localdomain >
<20180219120650.GA2142@zakirov.localdomain >
<20180219171915.65821d58@wp.localdomain >
<20180306162720.GA21305@zakirov.localdomain >
<20180312143611.67be88bc@wp.localdomain >
<e71b4911-7cd0-fd6f-29c8-95225c3beb11@sigaev.ru >
<CAPpHfduzc_6G0yqJfji7NxfJ6ML5nODDx6+A15GNis5zgRho+Q@mail.gmail.com >
<20180329143634.33c53348@wp.localdomain >
<03300255-cff2-b508-50f4-f00cca0a57a1@sigaev.ru >
<CAE2gYzw0i2ejZrS5y2-PVbe7qBE3deNAC1dLaFT75hNEgxZRUA@mail.gmail.com >
On Mon, 16 Apr 2018 12:45:23 +0200
Emre Hasegeli <emre@hasegeli.com> wrote:
> > Thank you, pushed with some editorization and renaming
> > text_startswith to starts_with
>
> I am sorry for not noticing this before, but what is the point of this
> operator? It seems to me we are only making the prefix searching
> business, which is already complicated, more complicated.
Hi.
>
> Also, the new operator is not documented on SQL String Functions and
> Operators table. It is not supported by btree text_pattern_ops or
> btree indexes with COLLATE "C". It is not defined for "citext", so
> people would get wrong results. It doesn't use pg_trgm indexes
> whereas LIKE can.
It is mentioned in documentation, look for "starts_with" function.
Currently it's working with spgist indexes which fact is pointed out in
the documentation too. I was going to add btree support but it would
require a new strategy so it will be matter of another patch. I think
this operator could be used in LIKE instead of current weird comparison
operators.
--
---
Ildus Kurbangaliev
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
view thread (11+ messages)
Message-ID: <20180416155036.36070396@wp.localdomain>
Permalink: ../20180416155036.36070396@wp.localdomain/
Also on: postgresql.org/message-id/20180416155036.36070396@wp.localdomain
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: i.kurbangaliev@postgrespro.ru, emre@hasegeli.com, teodor@sigaev.ru, a.korotkov@postgrespro.ru, a.zakirov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: Prefix operator for text and spgist support
In-Reply-To: <20180416155036.36070396@wp.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox