pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Pierre C <lists@peufeu.com>
Cc: Beaver, John E <John_Beaver@hms.harvard.edu>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: *** PROBABLY SPAM *** Does the psql executable support a "fetch many" approach when dumping large queries to stdout?
Date: Mon, 12 Apr 2010 22:49:29 -0400 (EDT)
Message-ID: <201004130249.o3D2nUd02232@momjian.us> (raw)
In-Reply-To: <op.vajyiejneorkce@immo.peufeu.com>

Pierre C wrote:
> > Does the psql executable have any ability to do a "fetch many", using a  
> > server-side named cursor, when returning results? It seems like it tries  
> > to retrieve the query entirely to local memory before printing to  
> > standard out.
> 
> I think it grabs the whole result set to calculate the display column  
> widths. I think there is an option to tweak this but don't remember which,  
> have a look at the psql commands (\?), formatting section.

See the FETCH_COUNT variable mentioned in the psql manual page.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com



view thread (3+ messages)

Message-ID: <201004130249.o3D2nUd02232@momjian.us>
Permalink:  ../201004130249.o3D2nUd02232@momjian.us/
Also on:    postgresql.org/message-id/201004130249.o3D2nUd02232@momjian.us

 · 

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-performance@postgresql.org
  Cc: bruce@momjian.us, lists@peufeu.com, John_Beaver@hms.harvard.edu
  Subject: Re: *** PROBABLY SPAM *** Does the psql executable support a "fetch many" approach when dumping large queries to stdout?
  In-Reply-To: <201004130249.o3D2nUd02232@momjian.us>

* 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