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 1ufM3r-0067Wd-MX for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 17:18:24 +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 1ufM3q-003EZd-OJ for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 17:18:23 +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 1ufM3q-003EZV-Dq for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 17:18:22 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ufM3o-000kkK-2f for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 17:18:21 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-555024588b1so2502963e87.1 for ; Fri, 25 Jul 2025 10:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753463899; x=1754068699; 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=uO5RJdcDQ7qP0rcUJj9emRWXIDXAxtPA83MU3CynBa8=; b=VB0B6J0fmmJIzquEJ9ZvGDzWMNJUX+ueExdNoKFpnTwSi2HUhFkp946vpiBoZUA/uL TUHa+oWHfJG+W6UsufzyJHuq/EfGQGpPjH2uCgtYakZ4pULSekhbL9KClTbiniYQpat8 5CA4lC6CHMkzjanvcsPEJJIPxYgylrO12oX40EAjkUpeMpcZWvtMYBdLUNm565oRHQ/7 vuN1tRdIWUvbWoCSWYps+WaV7owQDZgug3OJ7cEkz66DmYflkzHYmcSvB6IAMk8L5Top lDYmONGQxRTgsiDO7y8aTo/p6IEoe87A2WxGBSO1MFveRtLj7Ln9TIJW3Ts7nBNRR8et GX1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753463899; x=1754068699; 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=uO5RJdcDQ7qP0rcUJj9emRWXIDXAxtPA83MU3CynBa8=; b=PGuF7J+NMhZSKN81buitrrDLva7YHDi9EM3RbIGFs/Q9/Mx0VTILDbpBqYG+48Xh7S l/o+lMG36CODhmbnfBPYrdOJKF7EBCmqFOVmow6O3V2rZkd0FBcQWtKXxYVVSkqYtCVS 8j/vR9tv+FAGI7lFi7VJ1/PyAV6P/q2PGV49ycvuwY91GrVP1xkHQ2JUa9ysc71RhXIg +sgSdFgVKFUtf9qocQ5DdgystL31RPXOicU1SmHSl5xVcNkGtE7AKFaduUEiaLmkFGPX IgfiYIw39PtZzqTa6ZFL9pPs7X/MUFFySviVA8cKitoDXXxkRhPK918ikHgJgVZT6qA8 LQBw== X-Gm-Message-State: AOJu0Ywm5VBRdta8Sz9O0q/f5tICTU0DFoP5gkvMxeXniIEiDMzsha2T dPUIE5fxM3uSFdtD+II/5MqIdbfAmIwdIqQ6+TDeoBnaqIC3SS/qHYrMN2e8GrEEnGL+ABGDjNG BAl1cYrPprzzQhnI+BpBJT9zYfPQPUlc= X-Gm-Gg: ASbGncs6Ze3ny17XJe8JKfGquecfFBVA2JVpez64iu6naVHBsWGCHPLO4+Zos66/P7h gtiMyW7bXAZA8+5BHnixXoAfYjRFg4hbfNqFUY+hi9qs6otgL29P3rEqW7mZ0e8iJtiVx60V2DB g/yU/4u4adG0qyLEgdll741uT6itYR58PLFeEjspaDb1mbdaPOGzOV5baJSmyqPP3Ux3qDWejbc MMxqrxR X-Google-Smtp-Source: AGHT+IFGlvrhQqb6TFchezNjAkVv39QTyy7FsfKiaIMXh8p9OBszXgTyZtOuhN/U2WtZcvR/NqFsvMEd6vERDG/+1XI= X-Received: by 2002:a05:6512:3f12:b0:553:2c93:613d with SMTP id 2adb3069b0e04-55b5f3d144amr896195e87.5.1753463898651; Fri, 25 Jul 2025 10:18:18 -0700 (PDT) MIME-Version: 1.0 References: <1934172.1753462470@sss.pgh.pa.us> <1936547.1753463422@sss.pgh.pa.us> In-Reply-To: <1936547.1753463422@sss.pgh.pa.us> From: Rumpi Gravenstein Date: Fri, 25 Jul 2025 13:18:07 -0400 X-Gm-Features: Ac12FXwFkxlUKH8rYvku7ZvhzjsFKh8n3cOEPSqhipkwjiRnUw4Q81IW5lwDh4g Message-ID: Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array To: Tom Lane Cc: PostgreSQL Content-Type: multipart/alternative; boundary="000000000000ce3f73063ac4202f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ce3f73063ac4202f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Now I'm wondering about stray entries in pg_cast. Also, do you have any extensions loaded in that DB that aren't in your other ones? Our databases are deployed with automation tools. They should all be created the same. They all have the same 17 extensions. I've asked a DBA to confirm. This issue only appears in the function I have listed. A similar function, same contents and parameter but with a different name, works the way I would expect. On Fri, Jul 25, 2025 at 1:10=E2=80=AFPM Tom Lane wrote: > Rumpi Gravenstein writes: > > No ... just one version: > > D'oh, actually this would have complained if there was more > than one match, so that theory is wrong: > > > xxxx_pub_dev_2_db=3D# DROP FUNCTION if exists _sa_setup_role; > > DROP FUNCTION > > Now I'm wondering about stray entries in pg_cast. Also, > do you have any extensions loaded in that DB that aren't > in your other ones? > > regards, tom lane > --=20 Rumpi Gravenstein --000000000000ce3f73063ac4202f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<snip>
Now I'm wondering about stray entries= in pg_cast.=C2=A0 Also,
do you have any extensions loaded in that DB th= at aren't
in your other ones?
</snip>

=
Our databases are deployed with automation tools.=C2=A0 They sho= uld all be created the same.=C2=A0 They all have the same 17 extensions.=C2= =A0 I've asked a DBA to confirm.

This issue on= ly appears in the function I have listed.=C2=A0 A similar function, same co= ntents and parameter but with=C2=A0a different=C2=A0name, works the=C2=A0wa= y I would expect.=C2=A0


On Fri, J= ul 25, 2025 at 1:10=E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Rumpi Gravenstein <rgravens@gmail.com> writes:
> No ... just one version:

D'oh, actually this would have complained if there was more
than one match, so that theory is wrong:

> xxxx_pub_dev_2_db=3D# DROP FUNCTION if exists _sa_setup_role;
> DROP FUNCTION

Now I'm wondering about stray entries in pg_cast.=C2=A0 Also,
do you have any extensions loaded in that DB that aren't
in your other ones?

=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
--000000000000ce3f73063ac4202f--