Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4MEKqA79811 for ; Tue, 22 May 2001 10:20:52 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from office.price.ru (office.price.ru [195.209.34.132]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4IFkEA38876 for ; Fri, 18 May 2001 11:46:15 -0400 (EDT) (envelope-from alexey@workshop.price.ru) Received: from workshop.price.ru ([195.209.34.137] ident=alexey) by office.price.ru with esmtp (Exim 3.22 #1) id 150mSC-0001qR-00; Fri, 18 May 2001 19:46:12 +0400 Received: by workshop.price.ru (8.9.3+Sun/8.9.1) id TAA12111; Fri, 18 May 2001 19:46:04 +0400 (MSD) From: Alexey Nalbat Reply-To: alexey@price.ru Organization: Price Express To: Timothy.Keitt@StonyBrook.Edu, pgsql-interfaces@postgresql.org Subject: Re: Subject: unbuffered results from libpq? Date: Fri, 18 May 2001 19:32:29 +0400 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain; charset="koi8-r" MIME-Version: 1.0 Message-Id: <01051819460400.12019@workshop.price.ru> Content-Transfer-Encoding: 8bit X-Archive-Number: 200105/93 X-Sequence-Number: 1622 Hello. I have exactly the same question. Could anybody answer it? My impression is that it can't be maid. Even use of functions PQsetnonblocking, PQsendQuery, PQgetResult, PQconsumeInput,.. doesn't help. Is it so? Thanks. > 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.) -- WBR, Alexey Nalbat