g...@turnstep.com ("Greg Sabino Mullane") writes: >> I'm in the process of adding support for asynchronous server-side >> prepare to DBD::Pg because I need this for an application which is >> part of one of the products of my employer. > ... >> I would be willing (and probably also allowed to) to submit this as >> 'feature contribution' if there was any interest in it. > > Can you give a little snippet of code showing how it would be > used? I'm not quite clear on the benefit.
Exactly in the same way as the existing code supporting asynchronous queries. The benefit is that programs which use the driver in this way are not blocked in a PQprepare call before the query they are trying to execute is initiated asynchronously. At least for the program I was referring to, which is, among other things, supposed to make content-filtering descisions on behalf of a (squid-based) HTTP interception proxy, with program and DBMS running on different sides of the Atlantic, this is a significant improvement even during normal operations and also used for recovering from all kinds of network-related mischief, eg connections which silently turned into black holes. This code is actually already written and functional, I'm presently in the process of adding support for asynchronous connects. But due to time constraints, that will become a 'whatever happens to work' design I wouldn't dare to show to anyone.