Skip to content

Commit 7515bb4

Browse files
committed
Fix for psql pager when no tty, cleanup for vacuum attdisbursion type.
1 parent 5f7f236 commit 7515bb4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/backend/commands/vacuum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.41 1997/08/21 03:01:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.42 1997/08/22 04:13:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1769,7 +1769,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
17691769
while (HeapTupleIsValid(atup = heap_getnext(asdesc, 0, &abuf)))
17701770
{
17711771
int i;
1772-
double selratio; /* average ratio of rows selected for a random constant */
1772+
float32data selratio; /* average ratio of rows selected for a random constant */
17731773
VacAttrStats *stats;
17741774
Datum values[ Natts_pg_statistic ];
17751775
char nulls[ Natts_pg_statistic ];

src/bin/psql/psql.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.85 1997/08/22 00:17:26 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.86 1997/08/22 04:13:18 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -157,7 +157,7 @@ slashUsage(PsqlSettings * ps)
157157
char *pagerenv;
158158
FILE *fout;
159159

160-
if (settings.notty == 0 &&
160+
if (ps->notty == 0 &&
161161
(pagerenv = getenv("PAGER")) &&
162162
(pagerenv[0] != '\0') &&
163163
(fout = popen(pagerenv, "w")))
@@ -1008,7 +1008,7 @@ do_edit(const char *filename_arg, char *query, int *status_p)
10081008

10091009

10101010
static void
1011-
do_help(const char *topic)
1011+
do_help(PsqlSettings * ps, const char *topic)
10121012
{
10131013

10141014
if (!topic) {
@@ -1049,7 +1049,7 @@ do_help(const char *topic)
10491049
FILE *fout;
10501050

10511051
if (strcmp(topic, "*") == 0 &&
1052-
(settings.notty == 0) &&
1052+
(ps->notty == 0) &&
10531053
(pagerenv = getenv("PAGER")) &&
10541054
(pagerenv[0] != '\0') &&
10551055
(fout = popen(pagerenv, "w")))
@@ -1310,7 +1310,7 @@ HandleSlashCmds(PsqlSettings * settings,
13101310
break;
13111311
case 'h': /* help */
13121312
{
1313-
do_help(optarg);
1313+
do_help(settings, optarg);
13141314
break;
13151315
}
13161316
case 'i': /* \i is include file */

0 commit comments

Comments
 (0)