mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove feof(stdin) calls related to when to prompt for a password,
leftovers from when the password was read from stdin.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
* Originally by
|
||||
* B. Palmer, bpalmer@crimelabs.net 1-17-2001
|
||||
*
|
||||
* $PostgreSQL: pgsql/contrib/oid2name/oid2name.c,v 1.33 2007/12/11 02:31:49 tgl Exp $
|
||||
* $PostgreSQL: pgsql/contrib/oid2name/oid2name.c,v 1.34 2009/02/25 13:24:40 petere Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
@ -293,8 +293,7 @@ sql_conn(struct options * my_opts)
|
||||
|
||||
if (PQstatus(conn) == CONNECTION_BAD &&
|
||||
PQconnectionNeedsPassword(conn) &&
|
||||
password == NULL &&
|
||||
!feof(stdin))
|
||||
password == NULL)
|
||||
{
|
||||
PQfinish(conn);
|
||||
password = simple_prompt("Password: ", 100, false);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* A simple benchmark program for PostgreSQL
|
||||
* Originally written by Tatsuo Ishii and enhanced by many contributors.
|
||||
*
|
||||
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.83 2009/01/01 17:23:32 momjian Exp $
|
||||
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.84 2009/02/25 13:24:40 petere Exp $
|
||||
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
|
||||
* ALL RIGHTS RESERVED;
|
||||
*
|
||||
@ -309,8 +309,7 @@ doConnect(void)
|
||||
|
||||
if (PQstatus(conn) == CONNECTION_BAD &&
|
||||
PQconnectionNeedsPassword(conn) &&
|
||||
password == NULL &&
|
||||
!feof(stdin))
|
||||
password == NULL)
|
||||
{
|
||||
PQfinish(conn);
|
||||
password = simple_prompt("Password: ", 100, false);
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/contrib/vacuumlo/vacuumlo.c,v 1.37 2009/01/01 17:23:32 momjian Exp $
|
||||
* $PostgreSQL: pgsql/contrib/vacuumlo/vacuumlo.c,v 1.38 2009/02/25 13:24:40 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -91,8 +91,7 @@ vacuumlo(char *database, struct _param * param)
|
||||
|
||||
if (PQstatus(conn) == CONNECTION_BAD &&
|
||||
PQconnectionNeedsPassword(conn) &&
|
||||
password == NULL &&
|
||||
!feof(stdin))
|
||||
password == NULL)
|
||||
{
|
||||
PQfinish(conn);
|
||||
password = simple_prompt("Password: ", 100, false);
|
||||
|
Reference in New Issue
Block a user