The pgsql and _PGsql helper are close to perfect now. There are no direct systemcalls anymore, I changed the xrealloc call into a plain realloc because that's what every other module seems to do (I fail to see the reason to use xalloc and realloc). The configure dependencies have been simplified. I cleaned up the stack operations and verified that there are no leaks there.
The pgsql driver is about 72% faster than the old postgres driver (but only after fixing the file_peek() function in files/file.c; that (small) patch is not committed to CVS, since it belongs to the core, and I will not commit that without consensus here), without the patch, the driver becomes about 20% *slower* than the old postgres driver. It supports SSL as well now.
P.S. What seems to puzzle me though, is that functions declared returning void in Pike, seem to require a pop_stack() after using apply() to call them.