pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Timothy H. Keitt <Timothy.Keitt@StonyBrook.Edu>
To: pgsql-interfaces@postgresql.org
Subject: unbuffered results from libpq?
Date: Wed, 07 Mar 2001 19:03:26 -0500
Message-ID: <3AA6CC4E.7060204@StonyBrook.Edu> (raw)

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/




Message-ID: <3AA6CC4E.7060204@StonyBrook.Edu>
Permalink:  ../3AA6CC4E.7060204@StonyBrook.Edu/
Also on:    postgresql.org/message-id/3AA6CC4E.7060204@StonyBrook.Edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Timothy.Keitt@StonyBrook.Edu
  Subject: Re: unbuffered results from libpq?
  In-Reply-To: <3AA6CC4E.7060204@StonyBrook.Edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox