aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/print.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-29 22:25:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-29 22:25:08 +0000
commitc2f60711d25b256dbe2c1ddce833c5c69ca051cc (patch)
tree37f805b925c2d8827d27e9930351cf778fdc9afb /src/bin/psql/print.h
parent7c5ac5ce2234688a1048d4c26d9fa7cabeaa004f (diff)
downloadpostgresql-c2f60711d25b256dbe2c1ddce833c5c69ca051cc.tar.gz
postgresql-c2f60711d25b256dbe2c1ddce833c5c69ca051cc.zip
Create a FETCH_COUNT parameter that causes psql to execute SELECT-like
queries via a cursor, fetching a limited number of rows at a time and therefore not risking exhausting memory. A disadvantage of the scheme is that 'aligned' output mode will align each group of rows independently leading to odd-looking output, but all the other output formats work reasonably well. Chris Mair, with some additional hacking by moi.
Diffstat (limited to 'src/bin/psql/print.h')
-rw-r--r--src/bin/psql/print.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h
index a112998b484..0fc25dc846c 100644
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.31 2006/03/05 15:58:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.32 2006/08/29 22:25:07 tgl Exp $
*/
#ifndef PRINT_H
#define PRINT_H
@@ -12,6 +12,7 @@
extern FILE *PageOutput(int lines, unsigned short int pager);
+extern void ClosePager(FILE *pagerpipe);
extern void html_escaped_print(const char *in, FILE *fout);
@@ -32,11 +33,14 @@ typedef struct _printTableOpt
enum printFormat format; /* one of the above */
bool expanded; /* expanded/vertical output (if supported by
* output format) */
+ unsigned short int border; /* Print a border around the table. 0=none,
+ * 1=dividing lines, 2=full */
unsigned short int pager; /* use pager for output (if to stdout and
* stdout is a tty) 0=off 1=on 2=always */
bool tuples_only; /* don't output headers, row counts, etc. */
- unsigned short int border; /* Print a border around the table. 0=none,
- * 1=dividing lines, 2=full */
+ bool start_table; /* print start decoration, eg <table> */
+ bool stop_table; /* print stop decoration, eg </table> */
+ unsigned long prior_records; /* start offset for record counters */
char *fieldSep; /* field separator for unaligned text mode */
char *recordSep; /* record separator for unaligned text mode */
bool numericLocale; /* locale-aware numeric units separator and