Missing CFI() in SplitIdentifierString

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Missing CFI() in SplitIdentifierString
Date: 2026-12-02 06:41:51
Message-ID: aw-9r3Uhpv76T1Nr@jrouhaud
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

SplitIdentifierString can run pretty much forever without hitting a CFI. This
is mostly due to scan_quoted_identifier having O(n2) complexity, but the same
problem exists to a lesser degree in SplitIdentifierString.

I hit that problem by setting by mistake (bug in a some client app) search_path
to a big list of double quotes.

Simple patch attached, adding a couple of CFI in the mentioned functions.

Attachment Content-Type Size
0001-Add-CHECK_FOR_INTERRUPTS-in-SplitIdentifierString.patch text/plain 1.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-12-02 06:45:52 Show the conflict log table in \dRs+ output
Previous Message Xuneng Zhou 2026-12-02 06:28:21 Re: [WIP] Pipelined Recovery