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 1ujkyh-00BepR-N6 for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 20:43:16 +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 1ujkye-0015QN-20 for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 20:43:12 +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 1ujkyd-0015QB-Nc for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 20:43:11 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ujkya-0016Pm-2z for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 20:43:10 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id AA4CD1D00171; Wed, 6 Aug 2025 16:43:08 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 06 Aug 2025 16:43:08 -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=1754512988; x=1754599388; bh=wxuVlHItIZMYVNOMey+/kWomQDvwL8GJbYL5HaU/CGc=; b= eBoHLZNEbC2CkZ+hC3F4xyxfZvmjjRIYITmqcWBSh5GRh/Os051E3CKtGgAqcVtL eyNA5jWLmbPnE4HeN0yzZFmUrb7zQAUeueEzxAh+reDbDdn6VqILjm2lrvBOWCYf Cy6TJAvj0rZSbe/z9sEnQ5bCLI5ztgqx5L8uLkCPc1w5adamwjy8lCl4sd4SmzLc NsT6how8Xy9JrZ5VJReBC1EE6sOL2Fro4k5gRGb35XGu6HC6IfFYDOz6n3ZGt3lT 3qd1SsdQ6iRtFTE+nPKL2sMie/LtZ5uW6grqSYbjYH9FbTmEQT683wp1dF+aRHZq VC8KCiWVd4plGm8NLradBA== 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=1754512988; x= 1754599388; bh=wxuVlHItIZMYVNOMey+/kWomQDvwL8GJbYL5HaU/CGc=; b=g oku6nEIZhbM8I8NDms/yFhOoBu8kAB4mq7PGG/AomFNNoWOMUyFaDC2gOuWW0X79 WtPZzw7j/pO4G9+q7Pem436MnkLQrrLpqfL5QuFRep5JNztJ1JOgy2y1RtSv5L5S bA17s7hKgaolK0vF+H1tS1VJGl7qNq+Zr39oP9eDaGk88NAIDm9WQRyhzfMQLJSg w0wPcp7ySq/NTVzoslLxe8KVvUIsK95wAe03jVyIdqYwVicXLLcG88mxOg+6zl++ G72nl0gKdUs4zEmArjOfsDuQwEBAFaJdM83/t5WGcFxQ1z6+1h8pFhu/szNagQcY aM5NV2zc4qlUWdfQ1mQug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduudeltdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepfeegfeeiuedtgffgteeggfehkeejheetieeliefgteei keejvdeiveeigfehvedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgs pghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhgrhgrvh gvnhhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgr rdhushdprhgtphhtthhopehlrghurhgvnhiirdgrlhgsvgestgihsggvrhhtvggtrdgrth dprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgv shhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Aug 2025 16:43:07 -0400 (EDT) Message-ID: <12ce45df-2617-4106-9cbb-17c4d58b1bf7@aklaver.com> Date: Wed, 6 Aug 2025 13:43:06 -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 , Tom Lane Cc: 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 1:17 PM, Rumpi Gravenstein wrote: > Just coming back to this.  Don't know how to interpret this: > > xxx_pub_dev_2_db=# select proname, pronamespace, oid from pg_proc where > proname like '%sa_setup%'; >     proname     | pronamespace |   oid > ----------------+--------------+--------- > _sa_setup_role |      7038406 | 7869125 > (1 row) > > xxx_pub_dev_2_db=# drop FUNCTION if exists _sa_setup_role; > DROP FUNCTION > xxx_pub_dev_2_db=# select proname, pronamespace, oid from pg_proc where > proname like '%sa_setup%'; > proname | pronamespace | oid > ---------+--------------+----- > (0 rows) > > xxx_pub_dev_2_db=# select _sa_setup_role('af_repo_app'); > ERROR:  malformed array literal: "af_repo_app" > LINE 1: select _sa_setup_role('af_repo_app'); Do you have a custom type named sa_setup_role? In psql do: \dT or select * from pg_type where typname = 'sa_setup_role'; >                               ^ > DETAIL:  Array value must start with "{" or dimension information. > xxx_pub_dev_2_db=# > > On Fri, Jul 25, 2025 at 4:52 PM Tom Lane > wrote: > > Laurenz Albe > writes: > > On Fri, 2025-07-25 at 14:10 -0400, Tom Lane wrote: > >> So ... any chance you have a data type named _sa_setup_role? > > > ... it could also be a type "sa_setup_role", and "_sa_setup_role" > > is interpreted as the corresponding array type: > > Oh, of course --- that's a good deal more likely than my version. > >                         regards, tom lane > > > > -- > Rumpi Gravenstein -- Adrian Klaver adrian.klaver@aklaver.com