public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rumpi Gravenstein <[email protected]>
To: Tom Lane <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: PostgreSQL <[email protected]>
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Date: Wed, 6 Aug 2025 16:17:36 -0400
Message-ID: <CAEpg1wBUcKjbM+vqP=JLHQUCOW9ct=aVRo1gBEtAZ5SuMY6cYQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAEpg1wBxp=25isxj6yt2cf97KtvbwxvJfrJ9qYF8UQxGSBJ93Q@mail.gmail.com>
	<[email protected]>
	<CAEpg1wCDL+iYbG7ByjHcgfvJy7m3m-rDp-xKiYovvxeKTbG7iQ@mail.gmail.com>
	<[email protected]>
	<CAEpg1wALRocK=uDSNyJqdc=vhNGjYFmT3H_TNzihSOMS88WHfg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

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');
                              ^
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 <[email protected]> wrote:

> Laurenz Albe <[email protected]> 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


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
  In-Reply-To: <CAEpg1wBUcKjbM+vqP=JLHQUCOW9ct=aVRo1gBEtAZ5SuMY6cYQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox