pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
A mistake in a comment 2+ messages / 2 participants [nested] [flat]
* A mistake in a comment @ 2017-06-26 08:02 Victor Drobny <v.drobny@postgrespro.ru> 0 siblings, 1 reply; 2+ messages in thread From: Victor Drobny @ 2017-06-26 08:02 UTC (permalink / raw) To: pgsql-hackers Hello, I believe that I have found a mistake in a comment to parse_phrase_operator function. The comment has the following line: a <X> b (distance is no greater than X) which is not. According to documentation and practical results, this line should me changed on something like: a <X> b (distance is equal to X) Patch in the attachments fixes the issue. Thank you for attention! Best, Victor -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers Attachments: [text/x-diff] comment_patch.diff (502B, ../../2b5382fdff9b1f79d5eb2c99c4d2cbe2@postgrespro.ru/2-comment_patch.diff) download | inline diff: diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c index ee047bd..260d780 100644 --- a/src/backend/utils/adt/tsquery.c +++ b/src/backend/utils/adt/tsquery.c @@ -113,7 +113,7 @@ get_modifiers(char *buf, int16 *weight, bool *prefix) * Parse phrase operator. The operator * may take the following forms: * - * a <X> b (distance is no greater than X) + * a <X> b (distance is equal to X) * a <-> b (default distance = 1) * * The buffer should begin with '<' char ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: A mistake in a comment @ 2017-06-26 13:54 Tom Lane <tgl@sss.pgh.pa.us> parent: Victor Drobny <v.drobny@postgrespro.ru> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2017-06-26 13:54 UTC (permalink / raw) To: Victor Drobny <v.drobny@postgrespro.ru>; +Cc: pgsql-hackers Victor Drobny <v.drobny@postgrespro.ru> writes: > I believe that I have found a mistake in a comment to > parse_phrase_operator function. The comment has the following line: > a <X> b (distance is no greater than X) > which is not. According to documentation and practical results, this > line should me changed on something like: > a <X> b (distance is equal to X) Ah, this comment got missed when we changed the definition of <N>. > Patch in the attachments fixes the issue. Will apply, thanks. Looks to me like there's an outright bug here as well: if errno happened to already be ERANGE when we reach the strtol() call, the code will incorrectly report an error. 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-06-26 13:54 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-06-26 08:02 A mistake in a comment Victor Drobny <v.drobny@postgrespro.ru> 2017-06-26 13:54 ` 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