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

From Tom Lane
Subject Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Date
Msg-id 1943137.1753467040@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
List pgsql-general
I wrote:
> Well, there's got to be *something* different about that database.

After looking at the code I remembered that the parser might be taking
this as a type coercion request.  With that idea, I can duplicate the
observed behavior like so:

regression=# select _sa_setup_role('af_repo_app');
INFO:  af_repo_app
 _sa_setup_role 
----------------
 Done
(1 row)

regression=# create domain _sa_setup_role as varchar[];
CREATE DOMAIN
regression=# 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.

So ... any chance you have a data type named _sa_setup_role?

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Next
From: Laurenz Albe
Date:
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array