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

From Chris Cleveland
Subject Re: "Type does not exist" error when returning array of type in non-public schema
Date
Msg-id CABSN6VfBKabhFAYeP5TET+r9D1RRkFEt-UPxV4cbo-VrCyHVug@mail.gmail.com
Whole thread Raw
In response to "Type does not exist" error when returning array of type in non-public schema  (Chris Cleveland <ccleveland@dieselpoint.com>)
Responses Re: "Type does not exist" error when returning array of type in non-public schema
Re: "Type does not exist" error when returning array of type in non-public schema
List pgsql-hackers
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.

On Thu, Feb 6, 2025 at 12:14 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Feb 6, 2025 at 9:47 AM Chris Cleveland <ccleveland@dieselpoint.com>
> wrote:
>> RETURN "rdb.Token"[], RETURN "rdb.Token[]" all fail.

> Expecting these two to work suggests you need to re-read the section on how
> quoting identifiers works.

I'm wondering if it needs to be "Token".  Mixed-case SQL identifiers
are usually more of a pain than they're worth, frankly.

                        regards, tom lane


--
Chris Cleveland
312-339-2677 mobile

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
Next
From: Chapman Flack
Date:
Subject: Re: "Type does not exist" error when returning array of type in non-public schema