[Doc fix] Wrong explanation about tsquery_phrase

Started by Seki, Eijiover 9 years ago3 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t36146
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 28, 2026 at 08:05 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t36146_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t36146_1 && git checkout t36146_1

Patchset v1 (message #1) is on t36146_1

Jump to latest
#1Seki, Eiji
seki.eiji@jp.fujitsu.com

Hi all,

I found a wrong explanation about tsquery_phrase. I was slightly confused when I tried to use it.

The current document explains tsquery_phrase as the followings[1]- https://www.postgresql.org/docs/9.6/static/functions-textsearch.html.

- Function: tsquery_phrase(query1 tsquery, query2 tsquery, distance integer)
- Return Type: tsquery
- Description: make query that searches for query1 followed by query2 at maximum distance distance

However, 'exact distance' seems to be right instead of 'maximum distance'.

This was probably overlooked in the following commit.

028350f619f7688e0453fcd2c4b25abe9ba30fa7

[1]: - https://www.postgresql.org/docs/9.6/static/functions-textsearch.html

--
Regards,
Eiji Seki
Fujitsu

Attachments:

t36146_1
fix_document_about_tsquery_phrase.patchapplication/octet-stream; name=fix_document_about_tsquery_phrase.patchDownload+1-1
#2Robert Haas
robertmhaas@gmail.com
In reply to: Seki, Eiji (#1)
Re: [Doc fix] Wrong explanation about tsquery_phrase

On Tue, Feb 28, 2017 at 3:24 PM, Seki, Eiji <seki.eiji@jp.fujitsu.com> wrote:

I found a wrong explanation about tsquery_phrase. I was slightly confused when I tried to use it.

The current document explains tsquery_phrase as the followings[1].

- Function: tsquery_phrase(query1 tsquery, query2 tsquery, distance integer)
- Return Type: tsquery
- Description: make query that searches for query1 followed by query2 at maximum distance distance

However, 'exact distance' seems to be right instead of 'maximum distance'.

This was probably overlooked in the following commit.

028350f619f7688e0453fcd2c4b25abe9ba30fa7

I think you are correct.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Seki, Eiji (#1)
Re: [Doc fix] Wrong explanation about tsquery_phrase

"Seki, Eiji" <seki.eiji@jp.fujitsu.com> writes:

I found a wrong explanation about tsquery_phrase. I was slightly confused when I tried to use it.

Yes, this was definitely an oversight in 028350f61; thanks for catching
it! I think though that it would read better if it simply said
"distance", so I changed it that way.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers