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 1ujkaE-00BaKy-VZ for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 20:17:59 +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 1ujkaB-000uTV-9Y for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 20:17:55 +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 1ujkaA-000uTH-VQ for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 20:17:54 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ujka7-0016Cc-0Y for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 20:17:54 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-3324e2e6f54so13020621fa.1 for ; Wed, 06 Aug 2025 13:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754511468; x=1755116268; 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=noqOKvT4WXFG1kyuPm/eliTJl9Vef9Jl0Us6diNiEVw=; b=e6GAgGxtt2QbzKZheVRWUPJ24JszbjmLcqEgAmiT7quJ4x0IrGlS9jV4mXSK/mwNeW 2jyagvErz1i++MBzkdFg5uqxbvYdGrU42DscDQmUaCD6BGRUT4diFdr87oCshRewhc8y yuwrzIL9+7hLGtt7EUcnChzBV9QmduAiatdGVCLgm+dJkA3rytBQUUfvU92l7aT4Jy3G gMFq3wXClkJ819AO+mQEUxTKqpILuAhxrRv4XjphzCR/qM2Y5xrcwO1QQmDDwhEqOvBQ AZA5KfDZPFkvxE3j5Unyvlgap2ijB3B0wVTf6/N44Tb95bgqICVTcQBolE5TqUtHRFPw YiYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754511468; x=1755116268; 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=noqOKvT4WXFG1kyuPm/eliTJl9Vef9Jl0Us6diNiEVw=; b=wflD1ex9o1v2KnhNFEUHpK0ijl2cCQFiQpghYNYK5WHPHnhk8O/An6E6qlNvt2IlqD v26LofqaV1HYnILOmxE6/3PsfPY+CUMxsZ1cSZN2e0wwV5i2x+ElfwhwQICW+6Ptal9P rk45zzLleuWJ/n2fIdCWx1O5ZGs64wOqUEbqS7A0kq3vIlHs/gK0dTmfnYfHyRxJQtia yugEw/obr73qfGwPTdQ7EO7cIOSAKgM5+oIE/1VfTURUYaBWeOZQzbeTyYSzv0iQvYhx nxMHW6Z+A9E+9dJpAK/LMPSyHuIn7uhRxYqxhMHf3QTo9KG0kx1rF4xRoRSV+9Nv6TvT X5EA== X-Forwarded-Encrypted: i=1; AJvYcCU7Mv69emsTK9Zug/614CB4Azqf+VuLoAKhnT/Q8BTfI6bz7VqidIeHXN9kBD5fxgDh3XEsZHubsKYQIVcU@lists.postgresql.org X-Gm-Message-State: AOJu0Yzgyu81SK2YcqoJm1jraUCBznc+VpTgHZzUshayUtemsXMAzz07 Rn11UZVgpQto8+6YQ5WOCzRSIZd1s7AJdAbsQu67mQ9YfSDhDtpMm1S50ze0OqReSVqD/+kETYl OXrFoQ/InYskjPeQQv0VSEHJNQEKhQd8= X-Gm-Gg: ASbGncuMdNfhmNlRYsGvvcGKorsOnSmoQX88bl+nqct5aHGDKBivvaDQhkNfHpNKMRQ agC6OX2/7qU0sNZwgPSZVHp32cAhoD1jjvr8Gsq4IavdEOMY4aG2xrbv+5ihG6QxE6V5X7bwIEy TwiOmeDU04Jlp8WS1zXM1PiuquczZyClFDiVLPp4v4l8OmhuvFXxsVWvy8jVcdoiJwygoTrfOMY ufYRII= X-Google-Smtp-Source: AGHT+IH31NNxKfC+cshZK/2Bgq4vceeZThPJ3OUUOonfmYjxo2e2QZpYpiEdO80fzLK6ZGXJT9oyI5eepbRkbBGhB4k= X-Received: by 2002:a2e:a236:0:b0:32c:be6e:6719 with SMTP id 38308e7fff4ca-3338cd7d7f7mr1766381fa.1.1754511468140; Wed, 06 Aug 2025 13:17:48 -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: <2223785.1753476729@sss.pgh.pa.us> From: Rumpi Gravenstein Date: Wed, 6 Aug 2025 16:17:36 -0400 X-Gm-Features: Ac12FXzt1VjUuB-VPCuNkck-TBnTtnRDlSTL4vkdfN6H1an04JL0cC7wHeQDKt8 Message-ID: Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array To: Tom Lane Cc: Laurenz Albe , PostgreSQL Content-Type: multipart/alternative; boundary="000000000000d01ca2063bb80834" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d01ca2063bb80834 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Just coming back to this. Don't know how to interpret this: xxx_pub_dev_2_db=3D# 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=3D# drop FUNCTION if exists _sa_setup_role; DROP FUNCTION xxx_pub_dev_2_db=3D# select proname, pronamespace, oid from pg_proc where proname like '%sa_setup%'; proname | pronamespace | oid ---------+--------------+----- (0 rows) xxx_pub_dev_2_db=3D# select _sa_setup_role('af_repo_app'); ERROR: malformed array literal: "af_repo_app" LINE 1: select _sa_setup_role('af_repo_app'); ^ DETAIL: Array value must start with "{" or dimension information. xxx_pub_dev_2_db=3D# On Fri, Jul 25, 2025 at 4:52=E2=80=AFPM 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 > --=20 Rumpi Gravenstein --000000000000d01ca2063bb80834 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Just coming back to this.=C2=A0 Don't know how to inte= rpret this:

xxx_pub_dev_2_db=3D# select proname, pronamespace, oid f= rom pg_proc where proname like '%sa_setup%';
=C2=A0 =C2=A0 prona= me =C2=A0 =C2=A0 | pronamespace | =C2=A0 oid
----------------+----------= ----+---------
_sa_setup_role | =C2=A0 =C2=A0 =C2=A07038406 | 7869125(1 row)
=C2=A0
xxx_pub_dev_2_db=3D# drop FUNCTION if exists _sa_setu= p_role;
DROP FUNCTION
xxx_pub_dev_2_db=3D# select proname, pronamespa= ce, oid from pg_proc where proname like '%sa_setup%';
proname | = pronamespace | oid
---------+--------------+-----
(0 rows)
=C2=A0<= br>xxx_pub_dev_2_db=3D# select _sa_setup_role('af_repo_app');
ER= ROR: =C2=A0malformed array literal: "af_repo_app"
LINE 1: sele= ct _sa_setup_role('af_repo_app');
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ^
DETAIL: =C2=A0Array value must start with "{" or dimensi= on information.
xxx_pub_dev_2_db=3D#

On Fri, Jul 25= , 2025 at 4:52=E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Laurenz Albe <laurenz.albe@cybertec.at> 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_s= etup_role"
> is interpreted as the corresponding array type:

Oh, of course --- that's a good deal more likely than my version.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane


--
Rumpi Gravenstein
--000000000000d01ca2063bb80834--