PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array - Mailing list pgsql-general

From David G. Johnston
Subject PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Date
Msg-id CAKFQuwZJJQz=Ap_S7taL1iJwS6tT0AvrVGThpxWMgQk9ZLSy2w@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array  (Rumpi Gravenstein <rgravens@gmail.com>)
Responses Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
List pgsql-general
On Wednesday, August 6, 2025, Rumpi Gravenstein <rgravens@gmail.com> wrote:

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=#

Yeah, we’ve already pretty much decided this function has nothing to do with it.  Go look at pg_type per the last example demonstrating the same error without the involvement of any user-defined function.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Next
From: Rumpi Gravenstein
Date:
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array