Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 5FE6B9FB769 for ; Sat, 26 May 2007 04:07:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 81290-06 for ; Sat, 26 May 2007 04:07:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from pop5-1.us4.outblaze.com (pop5-1.us4.outblaze.com [205.158.62.125]) by postgresql.org (Postfix) with SMTP id 4969B9FB598 for ; Sat, 26 May 2007 04:07:34 -0300 (ADT) Received: (qmail 32313 invoked from network); 26 May 2007 07:07:58 -0000 Received: from unknown (HELO nbd.it.uc3m.es) (ptb:linuxmail.org?linuxmail.org@linuxmail.org@163.117.139.192) by pop5-1.us4.outblaze.com with SMTP; 26 May 2007 07:07:58 -0000 Received: from inv.it.uc3m.es (oboe.it.uc3m.es [163.117.139.101]) by nbd.it.uc3m.es (8.13.1/8.13.1/Debian-15) with ESMTP id l4Q77QUW030698; Sat, 26 May 2007 09:07:27 +0200 Received: (from ptb@localhost) by inv.it.uc3m.es (8.11.0/8.11.0) id l4Q77QO09110; Sat, 26 May 2007 09:07:26 +0200 From: "Peter T. Breuer" Message-Id: <200705260707.l4Q77QO09110@inv.it.uc3m.es> Subject: Re: general PG network slowness (possible cure) (repost) In-Reply-To: <28399.1180138753@sss.pgh.pa.us> from "Tom Lane" at "May 25, 2007 08:19:13 pm" To: "Tom Lane" Date: Sat, 26 May 2007 09:07:26 +0200 (MET DST) CC: pgsql-performance@postgresql.org X-Anonymously-To: Reply-To: ptb@inv.it.uc3m.es X-message-flag: Had your Outlook virus, today? http://www.counterpane.com/crypto-gram-0103.html#4 X-WebTV-Stationery: Standard\; BGColor=black\; TextColor=black Reply-By: Sat, 1 Apr 2006 14:21:08 -0700 X-Mailer: ELM [version 2.4ME+ PL66 (25)] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/553 X-Sequence-Number: 24943 "Also sprach Tom Lane:" > "Peter T. Breuer" writes: > > But can I prepare a DECLARE x BINARY CURSOR FOR SELECT ... statement? > > The manual seems to say no. > > No, you just prepare the SELECT. At the protocol level, DECLARE CURSOR > is a tad useless. You can still fetch the data in binary if you want... How? It's a 7.4 server (or may be, more generally) and declare binary cursor is the only way I know to get binary data off it. AFAIR the only other way works only for an 8.* server and consists of sending the query with an annotation that a binary reply is expected. Peter