leftovers from when the password was read from stdin.
* 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"
if (PQstatus(conn) == CONNECTION_BAD &&
PQconnectionNeedsPassword(conn) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(conn);
password = simple_prompt("Password: ", 100, false);
* 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;
*
if (PQstatus(conn) == CONNECTION_BAD &&
PQconnectionNeedsPassword(conn) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(conn);
password = simple_prompt("Password: ", 100, false);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
if (PQstatus(conn) == CONNECTION_BAD &&
PQconnectionNeedsPassword(conn) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(conn);
password = simple_prompt("Password: ", 100, false);
* Implements the basic DB functions used by the archiver.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.81 2009/02/02 20:07:37 adunstan Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.82 2009/02/25 13:24:40 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (PQstatus(AH->connection) == CONNECTION_BAD &&
PQconnectionNeedsPassword(AH->connection) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(AH->connection);
password = simple_prompt("Password: ", 100, false);
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.116 2009/02/25 13:03:06 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.117 2009/02/25 13:24:40 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (PQstatus(conn) == CONNECTION_BAD &&
PQconnectionNeedsPassword(conn) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(conn);
password = simple_prompt("Password: ", 100, false);
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.153 2009/01/01 17:23:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.154 2009/02/25 13:24:40 petere Exp $
*/
#include "postgres_fe.h"
if (PQstatus(pset.db) == CONNECTION_BAD &&
PQconnectionNeedsPassword(pset.db) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(pset.db);
password = simple_prompt(password_prompt, 100, false);
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.33 2009/01/01 17:23:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.34 2009/02/25 13:24:40 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (PQstatus(conn) == CONNECTION_BAD &&
PQconnectionNeedsPassword(conn) &&
- password == NULL &&
- !feof(stdin))
+ password == NULL)
{
PQfinish(conn);
password = simple_prompt("Password: ", 100, false);