On Mon, Nov 01, 2010 at 07:35:44PM +0100, Patrick Ben Koetter wrote: > Out of curiosity I started to play around with Postfix and PostgreSQL. > PostgreSQL recommends "prepared statements" to speed up queries (by ~%20). > > As I understand it "prepared statements" must be defined once when a DB > session starts and they will be available only to the particular client that > requested the "prepared statement". Any subsequent client connecting will have > to PREPARE a "prepared statement" for itself. > > I see I can get around multiple PREPARE statements if I use the Postfix > proxymap daemon, but how would I send the initial PREPARE query? > > Has anyone ever tried this? Is it "if its not documented, then its not there"?
You need to customize the Postfix PgSQL driver to (automatically) support prepared statements. -- Viktor.