With regard to my previous post , I am trying to avoid schema prefixes by setting search_paths, however, I want to limit the scope as much as possible so I'm doing this:
BEGIN TRANSACTION;
SET LOCAL search_path to mySchema;
CALL STORED_PROCEDURE();
UPDATE TABLE MYTABLE1(//SOME CODE);
COMMIT;
CALL STORED_PROCEDURE();
Now, the proc has it's own begin, commit statements, so I'm wondering if the procedure will respect it's outer transaction, i.e.
- Will the
stored_procedurerespect the search_path set by it's parent transaction block? - if updating the table fails, will operations done inside the procedure also rollback?