pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed^@ operator for text
4+ messages / 3 participants
[nested] [flat]
* ^@ operator for text
@ 2021-12-23 11:34 PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 4+ messages in thread
From: PG Doc comments form @ 2021-12-23 11:34 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: splarv@ya.ru
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/14/functions-string.html
Description:
In the new documentation
https://www.postgresql.org/docs/14/functions-string.html
you again lost information about ^@ operator for text and keep information
about only function starts_with on which this operator is based. But ^@ is
very important, because it can be accelerated by special index SP-GIST
index.
https://www.postgresql.org/docs/14/spgist-builtin-opclasses.html
The task to filter text strings by prefix is rather common and using ^@ and
SP-GIST is the best solution for this (rather options is to use starts_with
without index acceleration or use LIKE construction with SP-GIST, which more
complex (need to mention C locales), overengeniered and may be more slow).
As I say the filtering text by prefix is very common task, but information
about the best method is absent now.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: ^@ operator for text
@ 2021-12-23 15:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2021-12-23 15:18 UTC (permalink / raw)
To: splarv@ya.ru; +Cc: pgsql-docs@lists.postgresql.org
PG Doc comments form <noreply@postgresql.org> writes:
> In the new documentation
> https://www.postgresql.org/docs/14/functions-string.html
> you again lost information about ^@ operator for text and keep information
> about only function starts_with on which this operator is based.
"Again"? It was never there before, cf
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=710d90da1
I did do something about this recently, though:
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=2ae5d72f0
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: ^@ operator for text
@ 2021-12-24 11:52 Олег Самойлов <splarv@ya.ru>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Олег Самойлов @ 2021-12-24 11:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
> 23 дек. 2021 г., в 18:18, Tom Lane <tgl@sss.pgh.pa.us> написал(а):
>
> PG Doc comments form <noreply@postgresql.org> writes:
>> In the new documentation
>> https://www.postgresql.org/docs/14/functions-string.html
>> you again lost information about ^@ operator for text and keep information
>> about only function starts_with on which this operator is based.
>
> "Again"? It was never there before, cf
>
> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=710d90da1
>
> I did do something about this recently, though:
>
> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=2ae5d72f0
>
> regards, tom lane
I think need to mention that the main benefits of this operator (vs function starts_with) is the using with special SP-GIST index. So searching and filtering can be indexed.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: ^@ operator for text
@ 2021-12-24 22:56 Tom Lane <tgl@sss.pgh.pa.us>
parent: Олег Самойлов <splarv@ya.ru>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2021-12-24 22:56 UTC (permalink / raw)
To: Олег Самойлов <splarv@ya.ru>; +Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv@ya.ru> writes:
> 23 дек. 2021 г., в 18:18, Tom Lane <tgl@sss.pgh.pa.us> написал(а):
>> I did do something about this recently, though:
>> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=2ae5d72f0
> I think need to mention that the main benefits of this operator (vs function starts_with) is the using with special SP-GIST index. So searching and filtering can be indexed.
Not really true anymore, see a148f8bc0.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-12-24 22:56 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 11:34 ^@ operator for text PG Doc comments form <noreply@postgresql.org>
2021-12-23 15:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-12-24 11:52 ` Олег Самойлов <splarv@ya.ru>
2021-12-24 22:56 ` Tom Lane <tgl@sss.pgh.pa.us>
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