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

From Chapman Flack
Subject Re: "Type does not exist" error when returning array of type in non-public schema
Date
Msg-id 67A525F6.8050706@acm.org
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 02/06/25 16:06, Chris Cleveland 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.

That pretty much nails down that the type name appears somewhere
in the quoted-literal function body. But you haven't spotted where?

You still haven't mentioned which PL the function is written in.

I wonder if, for some PL, there could be a generated preamble/postamble
around your function body that you don't see, that contains the name
of the return type.

If that were to turn out to be the source of the issue, it would suggest
that the generated code missed a place where the fully-qualified name
should be used.

Regards,
-Chap




pgsql-hackers by date:

Previous
From: Chris Cleveland
Date:
Subject: Re: "Type does not exist" error when returning array of type in non-public schema
Next
From: "David G. Johnston"
Date:
Subject: Re: "Type does not exist" error when returning array of type in non-public schema