From: "bts solutions" <bts_postgresql(at)hotmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject:
Date: 2003-03-04 08:31:40
Message-ID: F142hr92xyNdetFu0zn000263f6@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

We have implemented use of cursor in psql.

The implementation is backwards compatible so that the old method for
selecting/printing data is the default method. The cursor mode can be
enabled by setting a new variable "USECURSOR" to true.

The printout uses the usual "printQuery" function, but header is only
printed first time and footer is printed seperately. In the functions
"print_aligned_text" and "print_aligned_vertical" a trailing newline has
been disabled.

"printQuery" should have been split into these three components, but we have
not done this. This means that the layout analysis is performed for each
record printed (when using cursor).

We use psql extensively for piping data into next levels of various scripts,
selecting data from a 40+ million record table. Without the cursor method,
PostgreSQL first determines the whole result set before any record is coming
out of psql. With the cursor method, records come out for post processing in
parrallel with PostgreSQL defining the actual result set.

We use similar method when we work with Oracle and Informix databases.

We hope that you can use our patches.

Best Regards
Bo Tveden
Mads Madsen
BTS Solutions

_________________________________________________________________
Find din ferie p MSN Rejser http://www.msn.dk/rejser

Attachment Content-Type Size
print.patch text/plain 601 bytes
common.patch text/plain 4.3 KB

Responses

  • Re: at 2003-03-04 15:22:25 from Tom Lane

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-03-04 15:22:25 Re:
Previous Message Christopher Kings-Lynne 2003-03-04 04:33:05 Re: new format for describe (repost #2)