Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x8FLe-000000013PB-2L1J for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Sep 2026 11:04:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x8FLc-00000006Jj9-25yK for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Sep 2026 11:04:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7vU9-000000056eJ-08lQ for pgsql-bugs@lists.postgresql.org; Sat, 19 Sep 2026 13:52:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7vU6-00000000Df7-0BvL for pgsql-bugs@lists.postgresql.org; Sat, 19 Sep 2026 13:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=B1A6uD4tUYjnecQ1DrMV3up+R23daB4oWjqZCSTB4ls=; b=cmmG+hlNq35UTdPk8o8EPZDNKb fjFK/lVhoMilQPVyhMq9F5fhhguHv+yS88DTrdVpLWJVfgQvcdrKlVG4U+EE8ZtTew0ikgW2sPy2j N3Lukjj6ABRy/NrMAmF8yuplFIgjN5kPTg3KWL+jMyMwAD9YCMzJus48G7iBFUw4l33CZKo0meFC/ I1FtB1JoVsLeE9WzrP2UI/EWB092H/b8KD3mAK6OuB48LwVbaevvWcYgl/1UQa805ZXy3uhU1tNpU KiYCrgNV0PXKms6Q/5GT6tvLAozMvaLYfyeknn9Rl7MM0bFruZILwn7NxKOpabA2skrM1r5oZ2BzR ftZ+Kteg==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x7vU3-000ZCm-3C for pgsql-bugs@lists.postgresql.org; Sat, 19 Sep 2026 13:52:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7vU2-00000001kNb-1Nqm for pgsql-bugs@lists.postgresql.org; Sat, 19 Sep 2026 13:52:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19704: ispell dictionary accepts trailing junk in numeric COMPOUNDFLAG To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: imchifan@163.com Reply-To: imchifan@163.com, pgsql-bugs@lists.postgresql.org Date: Sat, 19 Sep 2026 13:51:31 +0000 Message-ID: <19704-fa063b3baac9bfa8@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19704 Logged by: Qifan Liu Email address: imchifan@163.com PostgreSQL version: 18.6 Operating system: Linux/amd64 Description: =20 Creating an ispell text-search dictionary from an affix file containing COMPOUNDFLAG 1x and FLAG num succeeds. PostgreSQL interprets the malformed compound flag as numeric flag 1. This can cause subtle text-search behavior in dictionaries installed from malformed affix files. Steps to reproduce ------------------ Run as an operating-system user allowed to create files in PostgreSQL's tsearch_data directory. set -eu sd=3D$(pg_config --sharedir)/tsearch_data n=3Dpg_numeric_compoundflag printf 'SET UTF-8\nCOMPOUNDFLAG 1x\nFLAG num\n' > "$sd/$n.affix" printf '2\nfoo/1\nbar/1\n' > "$sd/$n.dict" psql -X -v ON_ERROR_STOP=3D1 -At postgres <