Make tsqueryout() use a StringInfo

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Make tsqueryout() use a StringInfo
Date: 2026-08-13 15:46:07
Message-ID: 3428771.1786635967@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While doing the recent security work on tsvector/tsquery overflows,
I wondered why tsqueryout() is using its very own hand-rolled
implementation of an extensible string buffer, rather than using
StringInfo like the rest of the backend. I couldn't see any actual
bug there, so changing it was out of scope for a security fix.
But it seems fragile and hard to read, so here's a patch to make it
use StringInfo.

regards, tom lane

Attachment Content-Type Size
v1-0001-Rewrite-tsqueryout-to-use-StringInfo-to-build-the.patch text/x-diff 8.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-08-13 16:41:59 Re: problems with toast.* reloptions
Previous Message Bertrand Drouvot 2026-08-13 15:41:58 Re: Redesign per-backend statistics