Restructure error handling as recently discussed. It is now really
Tom Lane <tgl@sss.pgh.pa.us>
Restructure error handling as recently discussed. It is now really possible to trap an error inside a function rather than letting it propagate out to PostgresMain. You still have to use AbortCurrentTransaction to clean up, but at least the error handling itself will cooperate.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/bootstrap/bootstrap.c | modified | +1 −11 |
| src/backend/commands/copy.c | modified | +42 −7 |
| src/backend/commands/portalcmds.c | modified | +92 −65 |
| src/backend/commands/vacuum.c | modified | +60 −49 |
| src/backend/postmaster/bgwriter.c | modified | +23 −20 |
| src/backend/postmaster/postmaster.c | modified | +6 −2 |
| src/backend/storage/large_object/inv_api.c | modified | +32 −14 |
| src/backend/tcop/postgres.c | modified | +50 −59 |
| src/backend/tcop/pquery.c | modified | +199 −149 |
| src/backend/utils/error/elog.c | modified | +267 −124 |
| src/backend/utils/resowner/README | modified | +5 −1 |
| src/backend/utils/resowner/resowner.c | modified | +34 −3 |
| src/include/tcop/tcopprot.h | modified | +1 −6 |
| src/include/utils/elog.h | modified | +90 −1 |
| src/pl/plperl/plperl.c | modified | +2 −3 |
| src/pl/plpgsql/src/pl_comp.c | modified | +1 −2 |
| src/pl/plpgsql/src/pl_exec.c | modified | +1 −2 |
| src/pl/plpython/plpython.c | modified | +337 −515 |
| src/pl/plpython/plpython.h | deleted | +0 −68 |
| src/pl/tcl/pltcl.c | modified | +323 −392 |