pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o

pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o

pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o

pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o

pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o

pgsql: Fix broken logic for reporting PL/Python function names in errco

2018-02-14 Thread Tom Lane
Fix broken logic for reporting PL/Python function names in errcontext. plpython_error_callback() reported the name of the function associated with the topmost PL/Python execution context. This was not merely wrong if there were nested PL/Python contexts, but it risked a core dump if the topmost o