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.94.2) (envelope-from ) id 1ujlrS-00BoUe-15 for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 21:39:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ujlrQ-001NjX-94 for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 21:39:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ujlrP-001NjM-UM for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 21:39:47 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ujlrN-0016x6-12 for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 21:39:46 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-3322e4ac12cso2422041fa.2 for ; Wed, 06 Aug 2025 14:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754516385; x=1755121185; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1Cwg7OJ9HHfr+24inPx1CmyHZEXg1+3y0za0PeBczvA=; b=ZfGUD3F03nqBhz6fhSrGJQAO3FbuIdPZg1mZ2NU0yBnsLd8xn9TgLk4z+qSyrPwQbu OBENMzCX3eexnZn9TH3Ie3TXNQtQcD2RXMbIwfK67b6eQu+qC+xbHgiRYBxgqx1DIKZ3 3dv9uagx6N6dFIziOAPqsi/le0+4De6MMoQ0twQDxB4vCARhouaAAe1K7g4G/oq5u5NM nn/rJW7PqxgqlTjPFCWbCxZ4xF8U+iaI2nzIcCaipTRMRTSqJLwOkiJU5i5rFk20nw8+ 4kMs/r6GppsZUQxrRJ1LL7+RKXF3NmvhM2phL61mHClm5cwvU2kn/t4qui9oUOnheJT4 nZrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754516385; x=1755121185; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1Cwg7OJ9HHfr+24inPx1CmyHZEXg1+3y0za0PeBczvA=; b=iNSP8BhGe2oGULYC3WdN8tFOUzCBcvhOTeThmR2tyrD7z8duooDzefEpNqCeMsvNAn IahQCk+bpM1jsC0YwVEhZK6Hcnt9FNWxnGealqW5R021yLW8s4GydeMiBkVhtY3MBqBj KEL8ry7jxPr4sx+UzGjb/Ly7FNRGPPZ98Sr1L4jjrgCUshlKXkRqsdiwP29wM7+qNFKi x07XvqepKTPy64/QXn0xGgOaQg47G+YAu6S9W5OFE365Z8BAXNTUtwJtlQLQsHu2a8zg pyKOr/1xFB/65jIV0S3tmLRP3R3Wfh5uaDJ75hNr9kZyilra4sKi/CftTLbopKjENMqJ X7cw== X-Forwarded-Encrypted: i=1; AJvYcCWlvq1JfGMKq4OuapRKuIM6o0A//2KmwNvlb+KhbNWy6gOp/luDGOx6qSsxdIFJurVryuIe4nHq3Lhi593y@lists.postgresql.org X-Gm-Message-State: AOJu0Ywffj9t+0Ea6+FJskzi1Nns0YL12P23cX7Yu4IM9inV12D8D7Mo k6OJrmXj5VpjLZmc+NqgJMGsdr9mkEM9tPYIXByqWizJbGsACJytfrQoEx/1THUd+AxrzGhq3Hp 6lUgcfYArTKdFyUg/vCjPmPSd3CNs1L60aQ== X-Gm-Gg: ASbGncu+MikyRsVqN3pvE99xLKi2R4JuXnWdNfQ1VMNVrY9PAKUJ4Lk6Az2kaKUTYMn MGSeClc30J38ZMvHUVrtDDkr3tlBplNKzV5o7fGyyVDF4zw5WB4mL1mDv47tyBW5h1Tl/7T6teM cMgXFg1cXoXPbjTs9U2TVpwVFb8ujSI4LI+rtyzIgQcl2Malw6XGA/XGIemPXouE8ND60/GxD7D 24rrpeX6k+tfSVSeg== X-Google-Smtp-Source: AGHT+IF2sMXjN87fOxDJDgMgFYslgbTI0F5XSO3T5Wsl59r+aWs9X85meHEtxkQRTpXbQKg6PugInaxixoh/+VpK10c= X-Received: by 2002:a05:651c:504:b0:333:7e73:136c with SMTP id 38308e7fff4ca-3338145a9bemr13837461fa.35.1754516384517; Wed, 06 Aug 2025 14:39:44 -0700 (PDT) MIME-Version: 1.0 References: <1934172.1753462470@sss.pgh.pa.us> <1936547.1753463422@sss.pgh.pa.us> <1940680.1753465819@sss.pgh.pa.us> <1943137.1753467040@sss.pgh.pa.us> <2223785.1753476729@sss.pgh.pa.us> In-Reply-To: From: Rumpi Gravenstein Date: Wed, 6 Aug 2025 17:39:33 -0400 X-Gm-Features: Ac12FXxT_T8lFTEXJ07QHU_QNN0PmXyPcmKjXIQ6bJyLcnRT78u1QqcL_QsERFA Message-ID: Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array To: "David G. Johnston" Cc: Tom Lane , Laurenz Albe , PostgreSQL Content-Type: multipart/alternative; boundary="000000000000da122a063bb92d74" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000da122a063bb92d74 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That having a table and function with similar names causes this problem is a bug. Going forward I'll be sure to avoid the problem. On Wed, Aug 6, 2025 at 5:35=E2=80=AFPM David G. Johnston wrote: > On Wednesday, August 6, 2025, Rumpi Gravenstein > wrote: > >> Here's a reproducible test case that causes the problem in different >> schemas. The issue appears to be related to creating a table and a >> function that has the same name as the table with a prepended underscore= . >> > > Don=E2=80=99t do that. Naming a function (action) and table (noun) the s= ame seems > unwise anyway, underscores or no. > > David J. > > --=20 Rumpi Gravenstein --000000000000da122a063bb92d74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That having a table and function with similar names causes= this problem is a bug.

Going forward I'll be sure t= o avoid the problem.

On Wed, Aug 6, 2025 at 5:35= =E2=80=AFPM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, August 6, 2025, Rumpi Graven= stein <rgravens@= gmail.com> wrote:
Here's a reproducible=C2=A0test case that causes th= e problem=C2=A0in different schemas.=C2=A0 The issue appears to be related = to creating a table and a function that has the same name as the table with= a prepended underscore.

Don=E2=80=99= t do that.=C2=A0 Naming a function (action) and table (noun) the same seems= unwise anyway, underscores or no.

David J.
<= div>


--
Rumpi Gravenstein
--000000000000da122a063bb92d74--