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

From Tom Lane
Subject Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions
Date
Msg-id 1367517.1705287423@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions  (Zu-Ming Jiang <zuming.jiang@inf.ethz.ch>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: jian he
Date:
Subject: Re: BUG #18290: \di+ can not show the same name indexes
Next
From: Tom Lane
Date:
Subject: Re: BUG #18274: Error 'invalid XML content'