Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f2CK17x55660 for ; Mon, 12 Mar 2001 15:01:07 -0500 (EST) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from keittlab.bio.sunysb.edu (keittlab.bio.sunysb.edu [129.49.19.70]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2803Yx57868 for ; Wed, 7 Mar 2001 19:03:34 -0500 (EST) (envelope-from Timothy.Keitt@StonyBrook.Edu) Received: from keittlab-6.keittlab.bio.sunysb.edu ([192.168.1.6] helo=StonyBrook.Edu) by keittlab.bio.sunysb.edu with esmtp (Exim 3.12 #1 (Debian)) id 14antz-0007Ob-00 for ; Wed, 07 Mar 2001 19:03:31 -0500 Message-ID: <3AA6CC4E.7060204@StonyBrook.Edu> Date: Wed, 07 Mar 2001 19:03:26 -0500 From: "Timothy H. Keitt" Organization: State University of New York at Stony Brook User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; 0.8) Gecko/20010215 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: unbuffered results from libpq? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/99 X-Sequence-Number: 1260 My impression is that libpq buffers all results of a query. Is there a way to get a "result stream" from the backend instead of having libpq read everything into a local buffer first? Currently, my application, after a query, simply copies the entire buffer from the libpq side into storage on the application side. This seems expensive for large queries. I'd rather read results directly into storage on the application side, i.e., "while input get next value from backend". (I know about libpqeasy, but this only iterates over the libpq buffer.) Tim -- Timothy H. Keitt Department of Ecology and Evolution State University of New York at Stony Brook Phone: 631-632-1101, FAX: 631-632-7626 http://life.bio.sunysb.edu/ee/keitt/