Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3827555

Browse files
committed
Fix notty output to show status result. -q option still turns it off.
1 parent ad43a72 commit 3827555

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/bin/psql/psql.c

+3-5
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.120 1997/12/06 22:57:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.121 1997/12/22 20:03:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -994,9 +994,7 @@ SendQuery(bool *success_p, PsqlSettings *pset, const char *query,
994994
case PGRES_COPY_OUT:
995995
*success_p = true;
996996
if (copy_out)
997-
{
998997
handleCopyOut(results, pset->quiet, copystream);
999-
}
1000998
else
1001999
{
10021000
if (!pset->quiet)
@@ -2372,7 +2370,7 @@ main(int argc, char **argv)
23722370
settings.opt.fieldSep = strdup(DEFAULT_FIELD_SEP);
23732371
settings.opt.pager = 1;
23742372
if (!isatty(0) || !isatty(1))
2375-
settings.quiet = settings.notty = 1;
2373+
settings.notty = 1;
23762374
#ifdef HAVE_LIBREADLINE
23772375
else
23782376
settings.useReadline = 1;
@@ -2494,7 +2492,7 @@ main(int argc, char **argv)
24942492
{
24952493
exit(listAllDbs(&settings));
24962494
}
2497-
if (!settings.quiet && !singleQuery && !qfilename)
2495+
if (!settings.quiet && !settings.notty && !singleQuery && !qfilename)
24982496
{
24992497
printf("Welcome to the POSTGRESQL interactive sql monitor:\n");
25002498
printf(" Please read the file COPYRIGHT for copyright terms "

0 commit comments

Comments
 (0)