pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: splarv@ya.ru
Subject: ^@ operator vs start_with function
Date: Tue, 31 Oct 2023 12:41:13 +0000
Message-ID: <169875607385.1769272.18010444720249291234@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/functions-string.html
Description:

https://www.postgresql.org/docs/16/functions-string.html
Said
text ^@ text → boolean
Returns true if the first string starts with the second string (equivalent
to the starts_with() function).
'alphabet' ^@ 'alph' → t

This is not true equivalent, because ^@ can be accelerated by special
SP-GiST index
https://www.postgresql.org/docs/14/spgist-builtin-opclasses.html
while function starts_with() perhaps no.
Thus need to mention in the description of ^@ it can be accelerated by the
special index with link to it. And in the description on start_with() need
to mention that alternative ^@ is better, because it can be accelerated by
index, while the function is not.


Message-ID: <169875607385.1769272.18010444720249291234@wrigleys.postgresql.org>
Permalink:  ../169875607385.1769272.18010444720249291234@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/169875607385.1769272.18010444720249291234@wrigleys.postgresql.org

 · 

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-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, splarv@ya.ru
  Subject: Re: ^@ operator vs start_with function
  In-Reply-To: <169875607385.1769272.18010444720249291234@wrigleys.postgresql.org>

* 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