I found

* [PostgreSQL - Are CREATE FUNCTION and DROP FUNCTION locking when used inside different transactions?](https://dba.stackexchange.com/q/126734/104401)

but there are no answers and isn't exactly the same as my question (though very similar).

---

Let's say I do the following:

1. Create a function `myfunc()`
2. Start a transaction from client A
3. Start a transaction from client B
4. In transaction B, use "create or replace function" to revise the definition of `myfunc()`
5. Commit transaction B
6. Call `myfunc()` from transaction A

**What happens in step 6?** Am I calling the original function as defined in step 1? Or the modified form from step 4 (committed in step 5)?

---

And if the function is dropped in step 4 rather than being modified, will step 6 fail or succeed? (This is probably the same question but modifications may work differently.)

---

Where is the documentation about this?