1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Default argument for createdb

Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
This commit is contained in:
Peter Eisentraut
2000-02-10 20:08:58 +00:00
parent 7528fd2d52
commit 2fb0ff0c5b
5 changed files with 38 additions and 33 deletions

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.16 2000/02/07 23:10:06 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.17 2000/02/10 20:08:56 petere Exp $
*/
#include <c.h>
#include "help.h"
@ -54,7 +54,7 @@ usage(void)
if (!user)
{
#ifndef WIN32
pw = getpwuid(getuid());
pw = getpwuid(geteuid());
if (pw)
user = pw->pw_name;
else

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.17 2000/02/07 23:10:06 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.18 2000/02/10 20:08:56 petere Exp $
*/
#include <c.h>
#include "mainloop.h"
@ -138,7 +138,7 @@ MainLoop(FILE *source)
/* Setting this will not have effect until next line. */
die_on_error = GetVariableBool(pset.vars, "EXIT_ON_ERROR");
die_on_error = GetVariableBool(pset.vars, "ON_ERROR_STOP");
/*
* query_buf holds query already accumulated. line is the

View File

@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.7 2000/01/19 20:08:35 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.8 2000/02/10 20:08:58 petere Exp $
#
#-------------------------------------------------------------------------
@ -126,7 +126,7 @@ fi
if [ -n "$MB" ]
then
mbcode=`pg_encoding "$MB"`
mbcode=`${PATHNAME}pg_encoding "$MB"`
if [ -z "$mbcode" ]
then
echo "$CMDNAME: \"$MB\" is not a valid encoding name"
@ -135,9 +135,12 @@ then
fi
if [ -z "$dbname" ]; then
echo "$CMDNAME: missing required argument database name"
echo "Try -? for help."
exit 1
if [ "$PGUSER" ]; then
dbname=$PGUSER
else
dbname=`${PATHNAME}pg_id -u -n`
fi
[ $? -ne 0 ] && exit 1
fi