Thread
-
Re: BUG #19084: dump/restore table doesn't work with GENARETED column and custom type and cast in function
David G. Johnston <david.g.johnston@gmail.com> — 2025-10-13T15:19:46Z
On Mon, Oct 13, 2025, 10:38 PG Bug reporting form <noreply@postgresql.org> wrote: > The following bug has been logged on the website: > > Bug reference: 19084 > Logged by: David Turoň > Email address: turon.david@seznam.cz > PostgreSQL version: 17.6 > Operating system: AlmaLinux release 9.0 > Description: > > > pg_restore: error: could not execute query: ERROR: type "test_type" does > not exist > LINE 1: SELECT array_agg((e->>'item')::test_type) FROM jsonb_array_... > This is an application bug, not Postgres. You relied on the public schema being in search_path but didn't declare that fact via SET on the function. Either use SET, or schema-qualify objects so you don't have to rely on search_path at all. David J.