Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zuming(dot)jiang(at)inf(dot)ethz(dot)ch
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions
Date: 2024-01-15 02:57:03
Message-ID: 1367517.1705287423@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-01-15 03:16:33 Re: BUG #18274: Error 'invalid XML content'
Previous Message jian he 2024-01-15 01:08:14 Re: BUG #18290: \di+ can not show the same name indexes