From 7515bb484eac9d04b5f49fde94566d1807b84dea Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Fri, 22 Aug 1997 04:13:18 +0000
Subject: [PATCH] Fix for psql pager when no tty, cleanup for vacuum
 attdisbursion type.

---
 src/backend/commands/vacuum.c |  4 ++--
 src/bin/psql/psql.c           | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index b4598a4e7b9..0c480581179 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.41 1997/08/21 03:01:36 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.42 1997/08/22 04:13:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1769,7 +1769,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
 	while (HeapTupleIsValid(atup = heap_getnext(asdesc, 0, &abuf)))
 	{
 	    int i;
-	    double selratio;  /* average ratio of rows selected for a random constant */
+	    float32data selratio;  /* average ratio of rows selected for a random constant */
 	    VacAttrStats *stats;
 	    Datum values[ Natts_pg_statistic ];
     	    char nulls[ Natts_pg_statistic ];
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index b425918913b..5f8dddb8be8 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.85 1997/08/22 00:17:26 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.86 1997/08/22 04:13:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,7 +157,7 @@ slashUsage(PsqlSettings * ps)
     char *pagerenv;
     FILE *fout;
 
-    if 	(settings.notty == 0 &&
+    if 	(ps->notty == 0 &&
 	(pagerenv = getenv("PAGER")) &&
 	(pagerenv[0] != '\0') &&
 	(fout = popen(pagerenv, "w")))
@@ -1008,7 +1008,7 @@ do_edit(const char *filename_arg, char *query, int *status_p)
 
 
 static void
-do_help(const char *topic)
+do_help(PsqlSettings * ps, const char *topic)
 {
 
     if (!topic) {
@@ -1049,7 +1049,7 @@ do_help(const char *topic)
 	FILE *fout;
 
 	if (strcmp(topic, "*") == 0 &&
-	    (settings.notty == 0) &&
+	    (ps->notty == 0) &&
 	    (pagerenv = getenv("PAGER")) &&
 	    (pagerenv[0] != '\0') &&
 	    (fout = popen(pagerenv, "w")))
@@ -1310,7 +1310,7 @@ HandleSlashCmds(PsqlSettings * settings,
 	break;
     case 'h':			/* help */
 	{
-	    do_help(optarg);
+	    do_help(settings, optarg);
 	    break;
 	}
     case 'i':			/* \i is include file */
-- 
GitLab