PG Bug reporting form <noreply@postgresql.org> writes:
> My fuzzer finds a suspicious alarm in Postgres 17devel: "ERROR: relation
> "hobbies_r" does not exist". I report it as I think it might be an
> unexpected error.
I don't see anything unexpected here: you made a transaction-local
change in search_path that renders that table invisible. It's not
instantly obvious how the flow of control gets to a lookup of
that table after the SET LOCAL; but evidently that's happening,
and I don't feel any urge to work out the details.
(Note that if you were expecting SET LOCAL to mean "local to this
function call", you're mistaken. You can get that effect with a SET
clause attached to the function definition; but this is not that.)
If you want people to take this sort of report seriously, you need to
analyze the behavior yourself, not expect us to look for a bug that
probably doesn't exist.
regards, tom lane