I don't think we need to complicate pqsignal's API for this. InsteadNot reliable.
we'd better document that SIGPIPE handling has to be set up and kept
stable before doing any libpq operations in a multithread app.
An app could install it's own signal handler and block SIGPIPE around all libpq calls. Signal blocking is per-thread. But the SIG_IGN/restore sequence affects the whole app - PQconnectdb calls would result in randomly dropped SIGPIPE signals.
-- Manfred
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html