"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I wrote a little extension to store a few small strings in shared
> memory. It seems to be working fine, and now I would like to write
> some regression tests; but it's not immediately obvious to me how I
> can do that. The approach used by, for example, citext doesn't
> work, because I don't see how to set shared_preload_libraries for
> the server startup. The existing contrib extensions which preload
> either seem to do something ad hoc or skip regression tests
> entirely, so I suspect that is my choice; but I figured I should
> ask.
Hm. pg_regress.c goes to some trouble to allow you to set session-level
options by setting PGOPTIONS in its environment, but that won't work
for options that have to be given to the postmaster. Maybe we should
invent a pg_regress switch that allows additional switches to be given
to the temp postmaster. Of course, this is never gonna work for
"make installcheck".
regards, tom lane