Re: "Type does not exist" error when returning array of type in non-public schema - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: "Type does not exist" error when returning array of type in non-public schema
Date
Msg-id CAKFQuwZc0TQAJv1+O5r8mY6-vhQ2ycOHqj68JLcXZ19Zink6oA@mail.gmail.com
Whole thread Raw
In response to Re: "Type does not exist" error when returning array of type in non-public schema  (Chris Cleveland <ccleveland@dieselpoint.com>)
List pgsql-hackers
On Thursday, February 6, 2025, Chris Cleveland <ccleveland@dieselpoint.com> wrote:
I solved the problem with:

CREATE FUNCTION myfunc ... RETURNS Token[] ... SET search_path to rdb;

I still don't know why it happens in the first place, though.

Because you are in the habit of not schema-qualifying object references and thus choose to rely on search_path.  Your choice, the SET clause is here for you.

David J.

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: "Type does not exist" error when returning array of type in non-public schema
Next
From: Nathan Bossart
Date:
Subject: Re: Prevent COPY FREEZE on Foreign tables