Daemon Extensions need more data
I have a postgres (database) daemon running that has a homemade shared object library which performs some translation duties for my setup.
I need to pass some information to my library: a path to run from.
I figure there are a couple ways to get this info to the library, here are some ideas:
(1) Pass it through the postgres daemon
(2) have the library read a file
(3) have the library get an environment variable
I don't really want to rewrite postgres, so option 1 is mostly out.
A configuration file would work.
I tested option 3 and it worked, but it didn't do what I expected.
More on option 3: The environment variable idea doesn't work from the caller's environment, but from the daemon's environment. Duh. Well, that is all well and good, but it would be nice to vary the setting on a per user basis.
I'm somewhat confused on how to do this right. Is there an elegant way to get at the caller's environment to modify the operating paramters of a daemon?
BTW, this is my first post. Please enlighten me if I've committed any sins.