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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chris Cleveland <ccleveland(at)dieselpoint(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "jcflack(at)acm(dot)org" <jcflack(at)acm(dot)org>
Subject: Re: "Type does not exist" error when returning array of type in non-public schema
Date: 2025-02-06 21:16:48
Message-ID: CAKFQuwZc0TQAJv1+O5r8mY6-vhQ2ycOHqj68JLcXZ19Zink6oA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, February 6, 2025, Chris Cleveland <ccleveland(at)dieselpoint(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-02-06 21:26:38 Re: Prevent COPY FREEZE on Foreign tables
Previous Message Chapman Flack 2025-02-06 21:13:27 Re: "Type does not exist" error when returning array of type in non-public schema