/* * pg_orrery.c -- Extension entry point * * PostgreSQL extension for orbital mechanics. * Provides TLE, ECI, geodetic, topocentric, observer, and pass_event types * with SGP4/SDP4 propagation, coordinate transforms, and pass prediction. * * v0.3.0 adds _PG_init for GUC registration (pg_orrery.ephemeris_path) * and on_proc_exit cleanup for the optional DE ephemeris handle. */ #include "postgres.h" #include "fmgr.h" #include "storage/ipc.h" #include "eph_provider.h" PG_MODULE_MAGIC; /* * _PG_init -- called when the extension shared library is loaded. * * Runs in the postmaster context. Registers GUC variables and * the process exit cleanup callback. Does NOT open the DE file * (that would create a shared fd inherited by all backends via * fork with undefined stream behavior). */ void _PG_init(void) { eph_register_gucs(); on_proc_exit(eph_cleanup, (Datum) 0); }