Add a feature for automatic initialization and finalization of dynamically
Tom Lane <tgl@sss.pgh.pa.us>
Add a feature for automatic initialization and finalization of dynamically loaded libraries: call functions _PG_init() and _PG_fini() if the library defines such symbols. Hence we no longer need to specify an initialization function in preload_libraries: we can assume that the library used the _PG_init() convention, instead. This removes one source of pilot error in use of preloaded libraries. Original patch by Ralf Engelschall, preload_libraries changes by me.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/config.sgml | modified | +15 −18 |
| doc/src/sgml/xfunc.sgml | modified | +67 −32 |
| src/backend/postmaster/postmaster.c | modified | +3 −8 |
| src/backend/utils/fmgr/dfmgr.c | modified | +24 −3 |
| src/backend/utils/init/miscinit.c | modified | +10 −50 |
| src/include/miscadmin.h | modified | +4 −2 |
| src/include/postmaster/postmaster.h | modified | +1 −2 |
| src/pl/plperl/plperl.c | modified | +17 −31 |
| src/pl/plpgsql/src/pl_handler.c | modified | +9 −31 |
| src/pl/plpgsql/src/plpgsql.h | modified | +2 −2 |
| src/pl/plpython/plpython.c | modified | +11 −36 |
| src/pl/tcl/pltcl.c | modified | +15 −23 |