aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-print.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-02-07 23:10:11 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-02-07 23:10:11 +0000
commit9ceb5d8a7bfc4a6315f37913afb5f3d6cefa651f (patch)
treecfe54170ff754e064955bb00be586a5b26ab7db3 /src/interfaces/libpq/fe-print.c
parent4842ef86247a323de9ec25e799d756c320222fe0 (diff)
downloadpostgresql-9ceb5d8a7bfc4a6315f37913afb5f3d6cefa651f.tar.gz
postgresql-9ceb5d8a7bfc4a6315f37913afb5f3d6cefa651f.zip
Fixed psql double quoting of SQL ids
Fixed libpq printing functions
Diffstat (limited to 'src/interfaces/libpq/fe-print.c')
-rw-r--r--src/interfaces/libpq/fe-print.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index e54167cc1fe..3b9102d4d84 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -10,7 +10,7 @@
* didn't really belong there.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.34 2000/02/05 12:33:22 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.35 2000/02/07 23:10:11 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,7 +59,7 @@ static char *do_header(FILE *fout, const PQprintOpt *po, const int nFields,
static void output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
unsigned char *fieldNotNum, int *fieldMax, char *border,
const int row_index);
-
+static void fill(int length, int max, char filler, FILE *fp);
/*
* PQprint()
@@ -440,7 +440,6 @@ do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
fputs("<tr>", fout);
else
{
- int j; /* for loop index */
int tot = 0;
int n = 0;
char *p = NULL;
@@ -557,7 +556,6 @@ output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
-#if 0
/*
* really old printing routines
*/
@@ -728,4 +726,17 @@ PQprintTuples(const PGresult *res,
}
}
}
-#endif
+
+
+
+/* simply send out max-length number of filler characters to fp */
+
+static void
+fill(int length, int max, char filler, FILE *fp)
+{
+ int count;
+
+ count = max - length;
+ while (count-- >= 0)
+ putc(filler, fp);
+}