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 1ujpEN-00CR2t-A4 for pgsql-general@arkaria.postgresql.org; Thu, 07 Aug 2025 01:15:43 +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 1ujpEL-00211k-Qf for pgsql-general@arkaria.postgresql.org; Thu, 07 Aug 2025 01:15:41 +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 1ujpEK-00211Y-UI for pgsql-general@lists.postgresql.org; Thu, 07 Aug 2025 01:15:41 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ujpEI-0018Rs-06 for pgsql-general@lists.postgresql.org; Thu, 07 Aug 2025 01:15:40 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 40D1B1D00BBE; Wed, 6 Aug 2025 21:15:38 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Wed, 06 Aug 2025 21:15:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1754529338; x=1754615738; bh=Zjxp+mPX6XI9wzeBeFPzzGNyAvs9skzCKl7Hte5E7QI=; b= TshhPZwo2qzlk6IxgFXTeDHGB5HUs1gRUjYqWjYkQI0kd4N9A7ZJL0H7fUzhA34E RuK9vlR5danr6DkdfroQxboAZ2wXQZh/rM+tpJnRSLF33u3r/SMzNErlYYfNXcPs Fdi2ELzYKUihKwCsizX8BiqE2K96JSMK1B+WbPdjlUSwnKIY27PygHMArhFeSiga FqxI3dMeDPPBMQicCRtowEA4x5vxLp8auxRaLHKRm08y/tQ6Oe/PLhweiojo0elZ Bp4DjY6I3uRnNPRsaeS5C83w2juhYroQcGwA36aijjKhxjCV8H/LjedkWbACUteB EXkGBPHrVoq+7Ur2KkvNbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1754529338; x= 1754615738; bh=Zjxp+mPX6XI9wzeBeFPzzGNyAvs9skzCKl7Hte5E7QI=; b=J 9lno2Cb1Zzhb9YUmEwwa2PO7xHfUrMdKkP00GMZVLyP/gS6JE/1UFeyBvL6GJR9q c0NMmor3tSGZZtcVkfa8h8Irq2gZpFkNRQQfNDlncOxgTdFS2yXNz2lxRXKTuCS6 T9hWXvzVEapNbACQ/PJguYpEAAB9GliItkzWpPKYiufd4pQIK8fTK32n+mH1bp0/ 6Ny0sA5IQjV4BRUnP1CSRX25uskhPAOayRx5z53jOSVUD7R0hKTDJpN1OWwfLTzv 81/Tuf5NXfU9+RqARNtGWKY8z1z0sIbgzzpPE9MrL8fb+Y3fwPKLd9a9lFuNimrM cKavLuFl4+CVbSn7D4yjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduudelheekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepfeegfeeiuedtgffgteeggfehkeejheetieeliefgteei keejvdeiveeigfehvedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgs pghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhgrhgrvh gvnhhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggrvhhiugdrghdrjhhohhhnshht ohhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrd hushdprhgtphhtthhopehlrghurhgvnhiirdgrlhgsvgestgihsggvrhhtvggtrdgrthdp rhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvsh hqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Aug 2025 21:15:36 -0400 (EDT) Message-ID: <5f2ce075-25f2-460e-8efc-0eec89afffca@aklaver.com> Date: Wed, 6 Aug 2025 18:15:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array To: Rumpi Gravenstein , "David G. Johnston" Cc: Tom Lane , Laurenz Albe , PostgreSQL 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> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/6/25 14:39, Rumpi Gravenstein wrote: > That having a table and function with similar names causes this problem > is a bug. Actually it is that a type and function have the same name. The connection is the table as that where the type gets it's name. Further complicated by you doing _type_name which turns the type into an array type. Now that you know, as the old joke goes: Doctor: What is the problem? Patient: It hurts when I do this. Doctor: Then don't do that. :) > > Going forward I'll be sure to avoid the problem. > > On Wed, Aug 6, 2025 at 5:35 PM 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’t do that.  Naming a function (action) and table (noun) the same > seems unwise anyway, underscores or no. > > David J. > > > > -- > Rumpi Gravenstein -- Adrian Klaver adrian.klaver@aklaver.com