pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Accept empty tsquery in binary input. 7+ messages / 1 participants [nested] [flat]
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3c5a4a867f2a4c72885de39306242661427f6e4f Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0d0d2a13e8b60f66017836ded0c05b5907921bf0 Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6c4172b34dfbdaceb89305e241d9eb60926890fc Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e05b7e2a45c7a151ad3f8771ba7f5d8b4ddd8d0c Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/774c47de1b3bfdd022c0ba9ec0ed77c0d62c805b Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/187051f85cefa1634453c28f8fba6b11c4acef27 Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Accept empty tsquery in binary input. @ 2026-10-22 17:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-10-22 17:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Accept empty tsquery in binary input. tsqueryrecv() calls findoprnd() even when the input has no query items, so it fails on an empty tsquery, which is legal data. This breaks, for example, binary COPY of a table containing an empty tsquery. Skip the operand walk for an empty query, as parse_tsquery() does. Bug: #19778 Reported-by: Shay Rojansky <roji@roji.org> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19778-1befc1fba593ab1b@postgresql.org Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/264c441c4fc7a0d85996c422bdd4348eb14d8664 Modified Files -------------- src/backend/utils/adt/tsquery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-10-22 17:51 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. Tom Lane <tgl@sss.pgh.pa.us> 2026-10-22 17:51 pgsql: Accept empty tsquery in binary input. 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