# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.197 2003/07/22 00:02:55 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.198 2003/07/23 08:46:54 petere Exp $
#
#-------------------------------------------------------------------------
exit_nicely(){
stty echo > /dev/null 2>&1
echo 1>&2
- echo "$CMDNAME failed." 1>&2
+ echo "$CMDNAME: failed" 1>&2
if [ "$noclean" != yes ]; then
if [ "$made_new_pgdata" = yes ]; then
- echo "Removing $PGDATA." 1>&2
- rm -rf "$PGDATA" || echo "Failed." 1>&2
+ echo "$CMDNAME: removing data directory \"$PGDATA\"" 1>&2
+ rm -rf "$PGDATA" || echo "$CMDNAME: failed" 1>&2
fi
else
- echo "Data directory $PGDATA will not be removed at user's request." 1>&2
+ echo "$CMDNAME: data directory \"$PGDATA\" not removed at user's request" 1>&2
fi
exit 1
}
errormsg=`$bindir/postgres -V 2>&1 >/dev/null`
(
echo "The program "
- echo " '$bindir/postgres'"
+ echo " $bindir/postgres"
echo "needed by $CMDNAME does not belong to PostgreSQL version $VERSION, or"
echo "there may be a configuration problem."
if test x"$errormsg" != x""; then
exit 1
fi
else
- echo "The program 'postgres' is needed by $CMDNAME but was not found in" 1>&2
- echo "the directory '$bindir'. Check your installation." 1>&2
+ echo "The program \"postgres\" is needed by $CMDNAME but was not found in" 1>&2
+ echo "the directory \"$bindir\". Check your installation." 1>&2
exit 1
fi
# Now we can assume that 'pg_id' belongs to the same version as the
# verified 'postgres' in the same directory.
if [ ! -x "$PGPATH/pg_id" ]; then
- echo "The program 'pg_id' is needed by $CMDNAME but was not found in" 1>&2
- echo "the directory '$PGPATH'. Check your installation." 1>&2
+ echo "The program \"pg_id\" is needed by $CMDNAME but was not found in" 1>&2
+ echo "the directory \"$PGPATH\". Check your installation." 1>&2
exit 1
fi
if [ `$PGPATH/pg_id -u` -eq 0 ]
then
- echo "You cannot run $CMDNAME as root. Please log in (using, e.g., 'su')" 1>&2
- echo "as the (unprivileged) user that will own the server process." 1>&2
+ echo "$CMDNAME: cannot be run as root" 1>&2
+ echo "Please log in (using, e.g., \"su\") as the (unprivileged) user that will" 1>&2
+ echo "own the server process." 1>&2
exit 1
fi
;;
--debug|-d)
debug=yes
- echo "Running with debug mode on."
+ echo "Running in debug mode."
;;
--show|-s)
show_setting=yes
;;
--noclean|-n)
noclean=yes
- echo "Running with noclean mode on. Mistakes will not be cleaned up."
+ echo "Running in noclean mode. Mistakes will not be cleaned up."
;;
# The name of the database superuser. Can be freely changed.
--username|-U)
-*)
echo "$CMDNAME: invalid option: $1"
- echo "Try '$CMDNAME --help' for more information."
+ echo "Try \"$CMDNAME --help\" for more information."
exit 1
;;
fi
if [ -z "$ENCODINGID" ]
then
- echo "$CMDNAME: $ENCODING is not a valid backend encoding name" 1>&2
+ echo "$CMDNAME: \"$ENCODING\" is not a valid server encoding name" 1>&2
exit 1
fi
fi
if [ -z "$PGDATA" ]
then
(
- echo "$CMDNAME: You must identify where the the data for this database"
- echo "system will reside. Do this with either a -D invocation"
- echo "option or a PGDATA environment variable."
+ echo "$CMDNAME: no data directory specified"
+ echo "You must identify the directory where the data for this database system"
+ echo "will reside. Do this with either the invocation option -D or the"
+ echo "environment variable PGDATA."
) 1>&2
exit 1
fi
then
(
echo
- echo "initdb variables:"
+ echo "$CMDNAME: internal variables:"
for var in PGDATA datadir PGPATH ENCODING ENCODINGID \
POSTGRES_SUPERUSERNAME POSTGRES_BKI \
POSTGRES_DESCR POSTGRESQL_CONF_SAMPLE \
do
if [ ! -f "$PREREQ_FILE" ] ; then
(
- echo "$CMDNAME does not find the file '$PREREQ_FILE'."
+ echo "$CMDNAME: file \"$PREREQ_FILE\" not found"
echo "This means you have a corrupted installation or identified the"
- echo "wrong directory with the -L invocation option."
+ echo "wrong directory with the invocation option -L."
) 1>&2
exit 1
fi
do
if [ x"`sed 1q $file`" != x"# PostgreSQL $short_version" ]; then
(
- echo "The input file '$file' needed by $CMDNAME does not"
- echo "belong to PostgreSQL $VERSION. Check your installation or specify the"
- echo "correct path using the -L option."
+ echo "$CMDNAME: input file \"$file\" does not belong to PostgreSQL $VERSION"
+ echo "Check your installation or specify the correct path using the option -L."
) 1>&2
exit 1
fi
if [ x"$pgdata_contents" != x ]
then
(
- echo "$CMDNAME: The directory $PGDATA exists but is not empty."
+ echo "$CMDNAME: directory \"$PGDATA\" exists but is not empty"
echo "If you want to create a new database system, either remove or empty"
- echo "the directory $PGDATA or run initdb with"
- echo "an argument other than $PGDATA."
+ echo "the directory \"$PGDATA\" or run $CMDNAME with an argument other than"
+ echo "\"$PGDATA\"."
) 1>&2
exit 1
else
mkdir -p "$PGDATA" >/dev/null 2>&1 || mkdir "$PGDATA" || exit_nicely
made_new_pgdata=yes
else
- $ECHO_N "Fixing permissions on existing directory $PGDATA... "$ECHO_C
+ $ECHO_N "fixing permissions on existing directory $PGDATA... "$ECHO_C
chmod go-rwx "$PGDATA" || exit_nicely
fi
echo "ok"
fi
if [ ! -f "$PGDATA"/global/pg_pwd ]; then
echo
- echo "The password file wasn't generated. Please report this problem." 1>&2
+ echo "$CMDNAME: The password file wasn't generated. Please report this problem." 1>&2
exit_nicely
fi
echo "ok"
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.15 2002/10/18 22:05:35 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.16 2003/07/23 08:46:57 petere Exp $
#
#-------------------------------------------------------------------------
exit_nicely(){
- echo "$CMDNAME failed."
+ echo "$CMDNAME: failed" 1>&2
rm -rf "$PGALTDATA"
exit 1
}
if [ "$USER" = 'root' -o "$LOGNAME" = 'root' ]
then
- echo "You cannot run $CMDNAME as root. Please log in (using, e.g., 'su')"
- echo "as the (unprivileged) user that will own the server process."
+ echo "$CMDNAME: cannot be run as root" 1>&2
+ echo "Please log in (using, e.g., \"su\") as the (unprivileged) user that will" 1>&2
+ echo "own the server process." 1>&2
exit 1
fi
-*)
echo "$CMDNAME: invalid option: $1" 1>&2
- echo "Try '$CMDNAME --help' for more information." 1>&2
+ echo "Try \"$CMDNAME --help\" for more information." 1>&2
exit 1
;;
*)
if [ -z "$Location" ]; then
echo "$CMDNAME: missing required argument LOCATION" 1>&2
- echo "Try '$CMDNAME -?' for help." 1>&2
+ echo "Try \"$CMDNAME --help\" for more information." 1>&2
exit 1
fi
haveenv=f
fi
-echo "The location will be initialized with username \"$EffectiveUser\"."
-echo "This user will own all the files and must also own the server process."
+echo "The files belonging to this location will be owned by user \"$EffectiveUser\"."
+echo "This user must also own the server process."
echo
# -----------------------------------------------------------------------
umask 077
if [ ! -d "$PGALTDATA" ]; then
- echo "Creating directory $PGALTDATA"
+ echo "creating directory $PGALTDATA"
mkdir "$PGALTDATA"
if [ "$?" -ne 0 ]; then
- echo "$CMDNAME: could not create $PGALTDATA" 1>&2
- echo "Make sure $PGALTDATA is a valid path and that you have permission to access it." 1>&2
+ echo "$CMDNAME: could not create directory \"$PGALTDATA\"" 1>&2
+ echo "Make sure \"$PGALTDATA\" is a valid path and that you have permission to access it." 1>&2
exit_nicely
fi
else
- echo "Fixing permissions on pre-existing directory $PGALTDATA"
+ echo "fixing permissions on pre-existing directory $PGALTDATA"
chmod go-rwx "$PGALTDATA" || exit_nicely
fi
if [ ! -d "$PGALTDATA"/base ]; then
- echo "Creating directory $PGALTDATA/base"
+ echo "creating directory $PGALTDATA/base"
mkdir "$PGALTDATA/base"
if [ "$?" -ne 0 ]; then
echo "$CMDNAME: could not create $PGALTDATA/base" 1>&2
- echo "Make sure $PGALTDATA/base is a valid path and that you have permission to access it." 1>&2
+ echo "Make sure \"$PGALTDATA/base\" is a valid path and that you have permission to access it." 1>&2
exit_nicely
fi
else
- echo "Fixing permissions on pre-existing directory $PGALTDATA/base"
+ echo "fixing permissions on pre-existing directory $PGALTDATA/base"
chmod go-rwx "$PGALTDATA/base" || exit_nicely
fi
#!/bin/sh
#
-# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/ipcclean.sh,v 1.13 2002/10/18 22:05:35 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/ipcclean.sh,v 1.14 2003/07/23 08:47:23 petere Exp $
#
CMDNAME=`basename $0`
if [ "$USER" = 'root' -o "$LOGNAME" = 'root' ]
then
(
- echo "You cannot run $CMDNAME as root. Please log in (using, e.g., 'su')"
- echo "as the (unprivileged) user that owned the server process."
+ echo "$CMDNAME: cannot be run as root" 1>&2
+ echo "Please log in (using, e.g., \"su\") as the (unprivileged) user that" 1>&2
+ echo "owned the server process." 1>&2
) 1>&2
exit 1
fi
#
if [ `uname` = 'QNX' ]; then
if ps -eA | grep -s '[p]ostmaster' >/dev/null 2>&1 ; then
- echo "$CMDNAME: You still have a postmaster running." 1>&2
+ echo "$CMDNAME: a postmaster is still running" 1>&2
exit 1
fi
rm -f /dev/shmem/PgS*
did_anything=
if ps x | grep -s '[p]ostmaster' >/dev/null 2>&1 ; then
- echo "$CMDNAME: You still have a postmaster running." 1>&2
+ echo "$CMDNAME: a postmaster is still running" 1>&2
exit 1
fi
# Author: Peter Eisentraut <peter_e@gmx.net>
# Public domain
-# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.7 2002/10/18 22:05:35 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.8 2003/07/23 08:47:25 petere Exp $
me=`basename $0`
Report bugs to <pgsql-bugs@postgresql.org>."
advice="\
-Try '$me --help' for more information."
+Try \"$me --help\" for more information."
if test "$#" -eq 0 ; then
echo "$me: argument required" 1>&2
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
* licence: BSD
*
- * $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.9 2003/04/04 20:42:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.10 2003/07/23 08:47:25 petere Exp $
*/
#include "postgres.h"
static void
usage(const char *progname)
{
+ printf(_("%s displays control information of a PostgreSQL database cluster.\n\n"), progname);
printf
(
_(
" %s [OPTION]\n\n"
"Options:\n"
" DATADIR show cluster control information for DATADIR\n"
- " -?, --help display this help and exit\n"
- " -V, --version display pg_controldata's version and exit\n\n"
+ " --help show this help, then exit\n"
+ " --version output version information, then exit\n"
),
progname
);
- printf(_("%s displays PostgreSQL database cluster control information.\n"), progname);
- printf(_("If no data directory is specified, the environment variable PGDATA\nis used.\n\n"));
+ printf(_("\nIf no data directory is specified, the environment variable PGDATA\nis used.\n\n"));
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
}
if (DataDir == NULL)
{
fprintf(stderr, _("%s: no data directory specified\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if ((fd = open(ControlFilePath, O_RDONLY)) == -1)
{
- fprintf(stderr, _("%s: could not open file \"%s\" for reading (%s)\n"),
+ fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
progname, ControlFilePath, strerror(errno));
exit(2);
}
if (read(fd, &ControlFile, sizeof(ControlFileData)) != sizeof(ControlFileData))
{
- fprintf(stderr, _("%s: could not read file \"%s\" (%s)\n"),
+ fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
progname, ControlFilePath, strerror(errno));
exit(2);
}
printf(_("Maximum length of identifiers: %u\n"), ControlFile.nameDataLen);
printf(_("Maximum number of function arguments: %u\n"), ControlFile.funcMaxArgs);
printf(_("Date/time type storage: %s\n"),
- (ControlFile.enableIntTimes ? _("64-bit integers") : _("Floating point")));
+ (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
printf(_("Maximum length of locale name: %u\n"), ControlFile.localeBuflen);
printf(_("LC_COLLATE: %s\n"), ControlFile.lc_collate);
printf(_("LC_CTYPE: %s\n"), ControlFile.lc_ctype);
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.32 2003/03/20 05:00:14 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.33 2003/07/23 08:47:30 petere Exp $
#
#-------------------------------------------------------------------------
Report bugs to <pgsql-bugs@postgresql.org>."
advice="\
-Try '$CMDNAME --help' for more information."
+Try \"$CMDNAME --help\" for more information."
# Placed here during build
elif [ -x "$bindir/postmaster" ] && [ -x "$bindir/psql" ]; then
PGPATH="$bindir"
else
- echo "The programs 'postmaster' and 'psql' are needed by $CMDNAME but" 1>&2
- echo "were not found in the directory '$bindir'." 1>&2
+ echo "The programs \"postmaster\" and \"psql\" are needed by $CMDNAME but" 1>&2
+ echo "were not found in the directory \"$bindir\"." 1>&2
echo "Check your installation." 1>&2
exit 1
fi
fi
if [ -z "$PGDATA" ];then
- echo "$CMDNAME: no database directory or environment variable \$PGDATA is specified" 1>&2
+ echo "$CMDNAME: no database directory specified and environment variable PGDATA unset" 1>&2
echo "$advice" 1>&2
exit 1
fi
PID=`sed -n 1p $PIDFILE`
if [ "$PID" -lt 0 ];then
PID=`expr 0 - $PID`
- echo "$CMDNAME: postgres is running (pid: $PID)"
+ echo "$CMDNAME: postgres is running (PID: $PID)"
else
- echo "$CMDNAME: postmaster is running (pid: $PID)"
+ echo "$CMDNAME: postmaster is running (PID: $PID)"
echo "Command line was:"
cat "$POSTOPTSFILE"
fi
exit 0
else
- echo "$CMDNAME: postmaster or postgres is not running"
+ echo "$CMDNAME: postmaster or postgres not running"
exit 1
fi
fi
PID=`sed -n 1p $PIDFILE`
if [ "$PID" -lt 0 ];then
PID=`expr 0 - $PID`
- echo "$CMDNAME: Cannot restart postmaster. postgres is running (pid: $PID)" 1>&2
+ echo "$CMDNAME: cannot restart postmaster; postgres is running (PID: $PID)" 1>&2
echo "Please terminate postgres and try again." 1>&2
exit 1
fi
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.72 2002/10/25 01:33:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.73 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
OpclassInfo *opcinfo;
if (g_verbose)
- write_msg(NULL, "reading namespaces\n");
+ write_msg(NULL, "reading schemas\n");
nsinfo = getNamespaces(&numNamespaces);
if (g_verbose)
if (!dataOnly)
{
if (g_verbose)
- write_msg(NULL, "dumping out user-defined namespaces\n");
+ write_msg(NULL, "dumping out user-defined schemas\n");
dumpNamespaces(fout, nsinfo, numNamespaces);
}
}
/* should never get here */
- write_msg(NULL, "failed sanity check, operator with oid %s not found\n", oid);
+ write_msg(NULL, "failed sanity check, operator with OID %s not found\n", oid);
/* no suitable operator name was found */
return (NULL);
{
selfInd = findTableByOid(tblinfo, numTables, oid);
if (selfInd >= 0)
- write_msg(NULL, "failed sanity check, parent oid %s of table %s (oid %s) not found\n",
+ write_msg(NULL, "failed sanity check, parent OID %s of table \"%s\" (OID %s) not found\n",
inhinfo[i].inhparent,
tblinfo[selfInd].relname,
oid);
else
- write_msg(NULL, "failed sanity check, parent oid %s of table (oid %s) not found\n",
+ write_msg(NULL, "failed sanity check, parent OID %s of table (OID %s) not found\n",
inhinfo[i].inhparent,
oid);
{
if (argNum >= arraysize)
{
- write_msg(NULL, "parseNumericArray: too many numbers\n");
+ write_msg(NULL, "could not parse numeric array: too many numbers\n");
exit_nicely();
}
temp[j] = '\0';
if (!(isdigit((unsigned char) s) || s == '-') ||
j >= sizeof(temp) - 1)
{
- write_msg(NULL, "parseNumericArray: bogus number\n");
+ write_msg(NULL, "could not parse numeric array: invalid character in number\n");
exit_nicely();
}
temp[j++] = s;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.72 2003/05/14 03:26:02 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.73 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
res = fclose(AH->OF);
if (res != 0)
- die_horribly(AH, modulename, "could not close the output file in CloseArchive\n");
+ die_horribly(AH, modulename, "could not close output archive file\n");
}
/* Public */
/* If we created a DB, connect to it... */
if (strcmp(te->desc, "DATABASE") == 0)
{
- ahlog(AH, 1, "connecting to new database %s as user %s\n", te->tag, te->owner);
+ ahlog(AH, 1, "connecting to new database \"%s\" as user \"%s\"\n", te->tag, te->owner);
_reconnectAsUser(AH, te->tag, te->owner);
}
}
{
#ifndef HAVE_LIBZ
if (AH->compression != 0)
- die_horribly(AH, modulename, "unable to restore from compressed archive (not configured for compression support)\n");
+ die_horribly(AH, modulename, "cannot restore from compressed archive (not configured for compression support)\n");
#endif
_printTocEntry(AH, te, ropt, true);
* we don't want warnings.
*/
if (!AH->CustomOutPtr)
- write_msg(modulename, "WARNING: skipping large object restoration\n");
+ write_msg(modulename, "WARNING: skipping large-object restoration\n");
}
else
{
_reconnectAsOwner(AH, NULL, te);
_selectOutputSchema(AH, te->namespace);
- ahlog(AH, 1, "restoring data for table %s\n", te->tag);
+ ahlog(AH, 1, "restoring data for table \"%s\"\n", te->tag);
/*
* If we have a copy statement, use it. As of
/* Is it table data? */
if (strcmp(te->desc, "TABLE DATA") == 0)
{
- ahlog(AH, 2, "checking whether we loaded %s\n", te->tag);
+ ahlog(AH, 2, "checking whether we loaded \"%s\"\n", te->tag);
reqs = _tocEntryRequired(te, ropt);
if ((reqs & REQ_DATA) != 0) /* We loaded the data */
{
- ahlog(AH, 1, "fixing up large object cross-reference for %s\n", te->tag);
+ ahlog(AH, 1, "fixing up large-object cross-reference for \"%s\"\n", te->tag);
FixupBlobRefs(AH, te);
}
}
else
- ahlog(AH, 2, "ignoring large object cross-references for %s %s\n", te->desc, te->tag);
+ ahlog(AH, 2, "ignoring large-object cross-references for %s %s\n", te->desc, te->tag);
te = te->next;
}
ArchiveHandle *AH = (ArchiveHandle *) AHX;
if (!AH->currToc)
- die_horribly(AH, modulename, "WriteData cannot be called outside the context of a DataDumper routine\n");
+ die_horribly(AH, modulename, "internal error -- WriteData cannot be called outside the context of a DataDumper routine\n");
return (*AH->WriteDataPtr) (AH, data, dLen);
}
ArchiveHandle *AH = (ArchiveHandle *) AHX;
if (!AH->StartBlobPtr)
- die_horribly(AH, modulename, "large object output not supported in chosen format\n");
+ die_horribly(AH, modulename, "large-object output not supported in chosen format\n");
(*AH->StartBlobPtr) (AH, AH->currToc, oid);
{
if (AH->txActive)
{
- ahlog(AH, 2, "committing large object transactions\n");
+ ahlog(AH, 2, "committing large-object transactions\n");
CommitTransaction(AH);
}
*/
if (!AH->txActive)
{
- ahlog(AH, 2, "starting large object transactions\n");
+ ahlog(AH, 2, "starting large-object transactions\n");
StartTransaction(AH);
}
if (!AH->blobTxActive)
if (loOid == 0)
die_horribly(AH, modulename, "could not create large object\n");
- ahlog(AH, 2, "restoring large object with oid %u as %u\n", oid, loOid);
+ ahlog(AH, 2, "restoring large object with OID %u as %u\n", oid, loOid);
InsertBlobXref(AH, oid, loOid);
res = lo_write(AH->connection, AH->loFd, (void *) AH->lo_buf, AH->lo_buf_used);
- ahlog(AH, 5, "wrote remaining %lu bytes of large object data (result = %lu)\n",
+ ahlog(AH, 5, "wrote remaining %lu bytes of large-object data (result = %lu)\n",
(unsigned long) AH->lo_buf_used, (unsigned long) res);
if (res != AH->lo_buf_used)
die_horribly(AH, modulename, "could not write to large object (result: %lu, expected: %lu)\n",
*/
if (((AH->blobCount / BLOB_BATCH_SIZE) * BLOB_BATCH_SIZE) == AH->blobCount)
{
- ahlog(AH, 2, "committing large object transactions\n");
+ ahlog(AH, 2, "committing large-object transactions\n");
CommitTransaction(AH);
CommitTransactionXref(AH);
}
/* Find TOC entry */
te = _getTocEntry(AH, id);
if (!te)
- die_horribly(AH, modulename, "could not find entry for id %d\n", id);
+ die_horribly(AH, modulename, "could not find entry for ID %d\n", id);
ropt->idWanted[id - 1] = 1;
break;
default:
- die_horribly(AH, modulename, "unrecognized file format '%d'\n", fmt);
+ die_horribly(AH, modulename, "unrecognized file format \"%d\"\n", fmt);
}
return AH;
/* Sanity check */
if (te->id <= 0 || te->id > AH->tocCount)
- die_horribly(AH, modulename, "entry id %d out of range - perhaps a corrupt TOC\n", te->id);
+ die_horribly(AH, modulename, "entry ID %d out of range -- perhaps a corrupt TOC\n", te->id);
te->hadDumper = ReadInt(AH);
te->oid = ReadStr(AH);
if (AH->ReadExtraTocPtr)
(*AH->ReadExtraTocPtr) (AH, te);
- ahlog(AH, 3, "read TOC entry %d (id %d) for %s %s\n", i, te->id, te->desc, te->tag);
+ ahlog(AH, 3, "read TOC entry %d (ID %d) for %s %s\n", i, te->id, te->desc, te->tag);
te->prev = AH->toc->prev;
AH->toc->prev->next = te;
res = PQexec(AH->connection, cmd->data);
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
- die_horribly(AH, modulename, "could not set session user to %s: %s",
+ die_horribly(AH, modulename, "could not set session user to \"%s\": %s",
user, PQerrorMessage(AH->connection));
PQclear(res);
res = PQexec(AH->connection, qry->data);
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
- die_horribly(AH, modulename, "could not set search_path to %s: %s",
+ die_horribly(AH, modulename, "could not set search_path to \"%s\": %s",
schemaName, PQerrorMessage(AH->connection));
PQclear(res);
#ifndef HAVE_LIBZ
if (AH->compression != 0)
write_msg(modulename, "WARNING: requested compression not available in this "
- "installation - archive will be uncompressed\n");
+ "installation -- archive will be uncompressed\n");
AH->compression = 0;
#endif
#ifndef HAVE_LIBZ
if (AH->compression != 0)
- write_msg(modulename, "WARNING: archive is compressed, but this installation does not support compression - no data will be available\n");
+ write_msg(modulename, "WARNING: archive is compressed, but this installation does not support compression -- no data will be available\n");
#endif
if (AH->version >= K_VERS_1_4)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.23 2002/10/25 01:33:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.24 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
AH->FH = stdout;
if (!AH->FH)
- die_horribly(AH, modulename, "could not open archive file %s: %s\n", AH->fSpec, strerror(errno));
+ die_horribly(AH, modulename, "could not open archive file \"%s\": %s\n", AH->fSpec, strerror(errno));
ctx->hasSeek = checkSeek(AH->FH);
}
else
AH->FH = stdin;
if (!AH->FH)
- die_horribly(AH, modulename, "could not open archive file %s: %s\n", AH->fSpec, strerror(errno));
+ die_horribly(AH, modulename, "could not open archive file \"%s\": %s\n", AH->fSpec, strerror(errno));
ctx->hasSeek = checkSeek(AH->FH);
if ((TocIDRequired(AH, id, ropt) & 2) != 0)
die_horribly(AH, modulename,
"Dumping a specific TOC data block out of order is not supported"
- " without id on this input stream (fseek required)\n");
+ " without ID on this input stream (fseek required)\n");
switch (blkType)
{
/* Are we sane? */
if (id != te->id)
- die_horribly(AH, modulename, "found unexpected block ID (%d) when reading data - expected %d\n",
+ die_horribly(AH, modulename, "found unexpected block ID (%d) when reading data -- expected %d\n",
id, te->id);
switch (blkType)
cnt = fread(in, 1, blkLen, AH->FH);
if (cnt != blkLen)
die_horribly(AH, modulename,
- "could not read data block - expected %lu, got %lu\n",
+ "could not read data block -- expected %lu, got %lu\n",
(unsigned long) blkLen, (unsigned long) cnt);
ctx->filePos += blkLen;
zp->avail_out = zlibOutSize;
res = inflate(zp, 0);
if (res != Z_OK && res != Z_STREAM_END)
- die_horribly(AH, modulename, "unable to uncompress data: %s\n", zp->msg);
+ die_horribly(AH, modulename, "could not uncompress data: %s\n", zp->msg);
out[zlibOutSize - zp->avail_out] = '\0';
ahwrite(out, 1, zlibOutSize - zp->avail_out, AH);
zp->avail_out = zlibOutSize;
res = inflate(zp, 0);
if (res != Z_OK && res != Z_STREAM_END)
- die_horribly(AH, modulename, "unable to uncompress data: %s\n", zp->msg);
+ die_horribly(AH, modulename, "could not uncompress data: %s\n", zp->msg);
out[zlibOutSize - zp->avail_out] = '\0';
ahwrite(out, 1, zlibOutSize - zp->avail_out, AH);
cnt = fread(in, 1, blkLen, AH->FH);
if (cnt != blkLen)
die_horribly(AH, modulename,
- "could not read data block - expected %lu, got %lu\n",
+ "could not read data block -- expected %lu, got %lu\n",
(unsigned long) blkLen, (unsigned long) cnt);
ctx->filePos += blkLen;
* Implements the basic DB functions used by the archiver.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.48 2003/06/22 00:56:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.49 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
v = parse_version(versionString);
if (v < 0)
- die_horribly(AH, modulename, "unable to parse version string \"%s\"\n", versionString);
+ die_horribly(AH, modulename, "could not parse version string \"%s\"\n", versionString);
return v;
}
else
newuser = (char *) requser;
- ahlog(AH, 1, "connecting to database %s as user %s\n", newdb, newuser);
+ ahlog(AH, 1, "connecting to database \"%s\" as user \"%s\"\n", newdb, newuser);
if (AH->requirePassword)
{
res = PQexec(AH->blobConnection, tblQry->data);
if (!res)
- die_horribly(AH, modulename, "could not find oid columns of table \"%s\": %s",
+ die_horribly(AH, modulename, "could not find OID columns of table \"%s\": %s",
te->tag, PQerrorMessage(AH->connection));
if ((n = PQntuples(res)) == 0)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.35 2003/03/20 03:34:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.36 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
sprintf(fmode, "wb%d", AH->compression);
tm->zFH = gzdopen(dup(fileno(tm->tmpFH)), fmode);
if (tm->zFH == NULL)
- die_horribly(AH, modulename, "could not gzdopen temporary file\n");
+ die_horribly(AH, modulename, "could not open temporary file\n");
}
else
res = fread(&((char *) buf)[used], 1, len, th->nFH);
}
else
- die_horribly(AH, modulename, "neither th nor fh specified in tarReadRaw() (internal error)\n");
+ die_horribly(AH, modulename, "internal error -- neither th nor fh specified in tarReadRaw()\n");
}
#if 0
*/
if (strncmp(tmpCopy, "copy ", 5) != 0)
die_horribly(AH, modulename,
- "bad COPY statement - could not find \"copy\" in string \"%s\"\n", tmpCopy);
+ "invalid COPY statement -- could not find \"copy\" in string \"%s\"\n", tmpCopy);
pos1 = 5;
for (pos1 = 5; pos1 < strlen(tmpCopy); pos1++)
if (pos2 >= strlen(tmpCopy))
die_horribly(AH, modulename,
- "bad COPY statement - could not find \"from stdin\" in string \"%s\" starting at position %lu\n",
+ "invalid COPY statement -- could not find \"from stdin\" in string \"%s\" starting at position %lu\n",
tmpCopy, (unsigned long) pos1);
ahwrite(tmpCopy, 1, pos2, AH); /* 'copy "table" [with oids]' */
}
if (fwrite(h, 1, 512, th->tarFH) != 512)
- die_horribly(th->AH, modulename, "unable to write tar header\n");
+ die_horribly(th->AH, modulename, "could not write tar header\n");
}
* by PostgreSQL
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.335 2003/06/25 04:08:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.336 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
fprintf(stderr,
_("%s: invalid -X option -- %s\n"),
progname, optarg);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
break;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
if (optind < (argc - 1))
{
- fprintf(stderr,
- _("%s: too many command line options (first is '%s')\n"
- "Try '%s --help' for more information.\n"),
- progname, argv[optind + 1], progname);
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
+ progname, argv[optind + 1]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
exit(1);
}
if (dataOnly && schemaOnly)
{
- write_msg(NULL, "The options \"schema only\" (-s) and \"data only\" (-a) cannot be used together.\n");
+ write_msg(NULL, "options \"schema only\" (-s) and \"data only\" (-a) cannot be used together\n");
exit(1);
}
if (dataOnly && outputClean)
{
- write_msg(NULL, "The options \"clean\" (-c) and \"data only\" (-a) cannot be used together.\n");
+ write_msg(NULL, "options \"clean\" (-c) and \"data only\" (-a) cannot be used together\n");
exit(1);
}
if (outputBlobs && selectTableName != NULL)
{
- write_msg(NULL, "Large object output is not supported for a single table.\n");
- write_msg(NULL, "Use a full dump instead.\n");
+ write_msg(NULL, "large-object output not supported for a single table\n");
+ write_msg(NULL, "use a full dump instead\n");
exit(1);
}
if (outputBlobs && selectSchemaName != NULL)
{
- write_msg(NULL, "Large object output is not supported for a single schema.\n");
- write_msg(NULL, "Use a full dump instead.\n");
+ write_msg(NULL, "large-object output not supported for a single schema\n");
+ write_msg(NULL, "use a full dump instead\n");
exit(1);
}
if (dumpData == true && oids == true)
{
- write_msg(NULL, "INSERT (-d, -D) and OID (-o) options cannot be used together.\n");
+ write_msg(NULL, "INSERT (-d, -D) and OID (-o) options cannot be used together\n");
write_msg(NULL, "(The INSERT command cannot set OIDs.)\n");
exit(1);
}
if (outputBlobs == true && (format[0] == 'p' || format[0] == 'P'))
{
- write_msg(NULL, "large object output is not supported for plain text dump files.\n");
+ write_msg(NULL, "large-object output is not supported for plain-text dump files\n");
write_msg(NULL, "(Use a different output format.)\n");
exit(1);
}
if (g_fout == NULL)
{
- write_msg(NULL, "could not open output file %s for writing\n", filename);
+ write_msg(NULL, "could not open output file \"%s\" for writing\n", filename);
exit(1);
}
g_fout->maxRemoteVersion = parse_version(PG_VERSION);
if (g_fout->maxRemoteVersion < 0)
{
- write_msg(NULL, "unable to parse version string \"%s\"\n", PG_VERSION);
+ write_msg(NULL, "could not parse version string \"%s\"\n", PG_VERSION);
exit(1);
}
printf(_(" -U, --username=NAME connect as specified database user\n"));
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
- printf(_("\nIf no database name is not supplied, then the PGDATABASE environment\n"
+ printf(_("\nIf no database name is supplied, then the PGDATABASE environment\n"
"variable value is used.\n\n"));
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
}
if (!res ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to obtain list of namespaces failed: %s", PQerrorMessage(g_conn));
+ write_msg(NULL, "query to obtain list of schemas failed: %s", PQerrorMessage(g_conn));
exit_nicely();
}
selectDumpableNamespace(&nsinfo[i]);
if (strlen(nsinfo[i].usename) == 0)
- write_msg(NULL, "WARNING: owner of namespace %s appears to be invalid\n",
+ write_msg(NULL, "WARNING: owner of schema \"%s\" appears to be invalid\n",
nsinfo[i].nspname);
}
/* Didn't find a match */
if (i == ntups)
{
- write_msg(NULL, "Specified schema \"%s\" does not exist.\n",
+ write_msg(NULL, "specified schema \"%s\" does not exist\n",
selectSchemaName);
exit_nicely();
}
if (strcmp(nsoid, nsinfo->oid) == 0)
return nsinfo;
}
- write_msg(NULL, "could not find namespace with OID %s\n", nsoid);
+ write_msg(NULL, "schema with OID %s does not exist\n", nsoid);
exit_nicely();
}
else
tinfo[i].isDefined = false;
if (strlen(tinfo[i].usename) == 0 && tinfo[i].isDefined)
- write_msg(NULL, "WARNING: owner of data type %s appears to be invalid\n",
+ write_msg(NULL, "WARNING: owner of data type \"%s\" appears to be invalid\n",
tinfo[i].typname);
}
lres = PQexec(g_conn, lockquery->data);
if (!lres || PQresultStatus(lres) != PGRES_COMMAND_OK)
{
- write_msg(NULL, "Attempt to lock table \"%s\" failed. %s",
+ write_msg(NULL, "attempt to lock table \"%s\" failed: %s",
tblinfo[i].relname, PQerrorMessage(g_conn));
exit_nicely();
}
/* Didn't find a match */
if (i == ntups)
{
- write_msg(NULL, "Specified table \"%s\" does not exist.\n",
+ write_msg(NULL, "specified table \"%s\" does not exist\n",
selectTableName);
exit_nicely();
}
* pg_attribute_relid_attnum_index.
*/
if (g_verbose)
- write_msg(NULL, "finding the columns and types of table %s\n",
+ write_msg(NULL, "finding the columns and types of table \"%s\"\n",
tbinfo->relname);
resetPQExpBuffer(q);
int numDefaults;
if (g_verbose)
- write_msg(NULL, "finding DEFAULT expressions of table %s\n",
+ write_msg(NULL, "finding default expressions of table \"%s\"\n",
tbinfo->relname);
resetPQExpBuffer(q);
if (adnum <= 0 || adnum > ntups)
{
- write_msg(NULL, "invalid adnum value %d for table %s\n",
+ write_msg(NULL, "invalid adnum value %d for table \"%s\"\n",
adnum, tbinfo->relname);
exit_nicely();
}
res = PQexec(g_conn, query->data);
if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to get comment on oid %s failed: %s",
+ write_msg(NULL, "query to get comment on OID %s failed: %s",
oid, PQerrorMessage(g_conn));
exit_nicely();
}
res = PQexec(g_conn, query->data);
if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to get database oid failed: %s",
+ write_msg(NULL, "query to get database OID failed: %s",
PQerrorMessage(g_conn));
exit_nicely();
}
if (!res ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to obtain information on type %s failed: %s",
+ write_msg(NULL, "query to obtain information on data type \"%s\" failed: %s",
tinfo->typname, PQerrorMessage(g_conn));
exit_nicely();
}
if (!res ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to obtain type information failed: %s", PQerrorMessage(g_conn));
+ write_msg(NULL, "query to obtain data type information failed: %s", PQerrorMessage(g_conn));
exit_nicely();
}
ntups = PQntuples(res);
if (ntups < 1)
{
- write_msg(NULL, "Got no rows from: %s", query->data);
+ write_msg(NULL, "query yielded no rows: %s\n", query->data);
exit_nicely();
}
fidx = findFuncByOid(finfo, numFuncs, lanplcallfoid);
if (fidx < 0)
{
- write_msg(NULL, "handler procedure for procedural language %s not found\n",
+ write_msg(NULL, "handler procedure for procedural language \"%s\" not found\n",
lanname);
exit_nicely();
}
vidx = findFuncByOid(finfo, numFuncs, lanvalidator);
if (vidx < 0)
{
- write_msg(NULL, "validator procedure for procedural language %s not found\n",
+ write_msg(NULL, "validator procedure for procedural language \"%s\" not found\n",
lanname);
exit_nicely();
}
if (!res ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to obtain information on function %s failed: %s",
+ write_msg(NULL, "query to obtain information on function \"%s\" failed: %s",
finfo->proname, PQerrorMessage(g_conn));
exit_nicely();
}
appendPQExpBuffer(q, " STABLE");
else if (provolatile[0] != PROVOLATILE_VOLATILE)
{
- write_msg(NULL, "Unexpected provolatile value for function %s\n",
+ write_msg(NULL, "unrecognized provolatile value for function \"%s\"\n",
finfo->proname);
exit_nicely();
}
if (!buildACLCommands(name, type, acls, owner, fout->remoteVersion, sql))
{
- write_msg(NULL, "could not parse ACL list (%s) for object %s (%s)\n",
+ write_msg(NULL, "could not parse ACL list (%s) for object \"%s\" (%s)\n",
acls, name, type);
exit_nicely();
}
if (PQgetisnull(res, 0, 1))
{
- write_msg(NULL, "query to obtain definition of view \"%s\" returned NULL oid\n",
+ write_msg(NULL, "query to obtain definition of view \"%s\" returned null OID\n",
tbinfo->relname);
exit_nicely();
}
int ntups2;
if (g_verbose)
- write_msg(NULL, "finding CHECK constraints for table %s\n",
+ write_msg(NULL, "finding check constraints for table \"%s\"\n",
tbinfo->relname);
resetPQExpBuffer(query);
case TableOidAttributeNumber:
return "tableoid";
}
- write_msg(NULL, "getAttrName(): invalid column number %d for table %s\n",
+ write_msg(NULL, "invalid column number %d for table \"%s\"\n",
attrnum, tblInfo->relname);
exit_nicely();
return NULL; /* keep compiler quiet */
max_oid = PQoidValue(res);
if (max_oid == 0)
{
- write_msg(NULL, "inserted invalid oid\n");
+ write_msg(NULL, "inserted invalid OID\n");
exit_nicely();
}
PQclear(res);
}
PQclear(res);
if (g_verbose)
- write_msg(NULL, "maximum system oid is %u\n", max_oid);
+ write_msg(NULL, "maximum system OID is %u\n", max_oid);
snprintf(sql, sizeof(sql),
"CREATE TEMPORARY TABLE pgdump_oid (dummy integer);\n"
"COPY pgdump_oid WITH OIDS FROM stdin;\n"
if (res == NULL ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "error in finding the last system oid: %s", PQerrorMessage(g_conn));
+ write_msg(NULL, "error in finding the last system OID: %s", PQerrorMessage(g_conn));
exit_nicely();
}
ntups = PQntuples(res);
ntups = PQntuples(res);
if (ntups < 1)
{
- write_msg(NULL, "could not find template1 database entry in the pg_database table\n");
+ write_msg(NULL, "could not find entry for database template1 in table pg_database\n");
exit_nicely();
}
if (ntups > 1)
{
- write_msg(NULL, "found more than one template1 database entry in the pg_database table\n");
+ write_msg(NULL, "found more than one entry for database template1 in table pg_database\n");
exit_nicely();
}
last_oid = atooid(PQgetvalue(res, 0, PQfnumber(res, "oid")));
continue;
if (g_verbose)
- write_msg(NULL, "dumping foreign key constraints for table %s\n",
+ write_msg(NULL, "dumping foreign key constraints for table \"%s\"\n",
tbinfo->relname);
/*
continue;
if (g_verbose)
- write_msg(NULL, "dumping triggers for table %s\n",
+ write_msg(NULL, "dumping triggers for table \"%s\"\n",
tbinfo->relname);
/*
if (PQgetisnull(res, j, i_tgconstrrelname))
{
- write_msg(NULL, "query produced NULL referenced table name for foreign key trigger \"%s\" on table \"%s\" (oid of table: %s)\n",
+ write_msg(NULL, "query produced null referenced table name for foreign key trigger \"%s\" on table \"%s\" (OID of table: %s)\n",
tgname, tbinfo->relname, tgconstrrelid);
exit_nicely();
}
p = strchr(p, '\\');
if (p == NULL)
{
- write_msg(NULL, "bad argument string (%s) for trigger \"%s\" on table \"%s\"\n",
+ write_msg(NULL, "invalid argument string (%s) for trigger \"%s\" on table \"%s\"\n",
PQgetvalue(res, j, i_tgargs),
tgname,
tbinfo->relname);
if (!res ||
PQresultStatus(res) != PGRES_COMMAND_OK)
{
- write_msg(NULL, "query to set search_path failed: %s",
+ write_msg(NULL, "command to set search_path failed: %s",
PQerrorMessage(g_conn));
exit_nicely();
}
if (!res ||
PQresultStatus(res) != PGRES_TUPLES_OK)
{
- write_msg(NULL, "query to obtain name of type %s failed: %s",
+ write_msg(NULL, "query to obtain name of data type %s failed: %s",
oid, PQerrorMessage(g_conn));
exit_nicely();
}
ntups = PQntuples(res);
if (ntups != 1)
{
- write_msg(NULL, "Got %d rows instead of one from: %s",
+ write_msg(NULL, "query yielded %d rows instead of one: %s\n",
ntups, query->data);
exit_nicely();
}
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.22 2003/06/22 00:56:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.23 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
if (optind < argc)
{
- fprintf(stderr,
- _("%s: too many command line options (first is '%s')\n"
- "Try '%s --help' for more information.\n"),
- progname, argv[optind], progname);
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
+ progname, argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
exit(1);
}
!buildACLCommands(fdbname, "DATABASE", dbacl, dbowner,
server_version, buf))
{
- fprintf(stderr, _("%s: could not parse ACL list (%s) for database %s\n"),
+ fprintf(stderr, _("%s: could not parse ACL list (%s) for database \"%s\"\n"),
progname, dbacl, fdbname);
PQfinish(conn);
exit(1);
ret = runPgDump(dbname);
if (ret != 0)
{
- fprintf(stderr, _("%s: pg_dump failed on %s, exiting\n"), progname, dbname);
+ fprintf(stderr, _("%s: pg_dump failed on database \"%s\", exiting\n"), progname, dbname);
exit(1);
}
}
appendPQExpBufferChar(cmd, '\'');
if (verbose)
- fprintf(stderr, _("%s: running %s\n"), progname, cmd->data);
+ fprintf(stderr, _("%s: running \"%s\"\n"), progname, cmd->data);
fflush(stdout);
fflush(stderr);
if (!conn)
{
- fprintf(stderr, _("%s: could not connect to database %s\n"),
+ fprintf(stderr, _("%s: could not connect to database \"%s\"\n"),
progname, dbname);
exit(1);
}
/* check to see that the backend connection was successfully made */
if (PQstatus(conn) == CONNECTION_BAD)
{
- fprintf(stderr, _("%s: could not connect to database %s: %s\n"),
+ fprintf(stderr, _("%s: could not connect to database \"%s\": %s\n"),
progname, dbname, PQerrorMessage(conn));
exit(1);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.47 2003/06/11 16:29:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.48 2003/07/23 08:47:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
fprintf(stderr,
_("%s: invalid -X option -- %s\n"),
progname, optarg);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
break;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.9 2003/04/04 20:42:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.10 2003/07/23 08:47:32 petere Exp $
*
*-------------------------------------------------------------------------
*/
set_xid = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != '\0')
{
- fprintf(stderr, _("%s: invalid argument for -x option\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("%s: invalid argument for option -x\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (set_xid == 0)
set_oid = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != '\0')
{
- fprintf(stderr, _("%s: invalid argument for -o option\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("%s: invalid argument for option -o\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (set_oid == 0)
minXlogId = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != ',')
{
- fprintf(stderr, _("%s: invalid argument for -l option\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("%s: invalid argument for option -l\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
minXlogSeg = strtoul(endptr+1, &endptr2, 0);
if (endptr2 == endptr+1 || *endptr2 != '\0')
{
- fprintf(stderr, _("%s: invalid argument for -l option\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("%s: invalid argument for option -l\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
if (optind == argc)
{
fprintf(stderr, _("%s: no data directory specified\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
{
if (errno != ENOENT)
{
- fprintf(stderr, _("%s: could not open %s for reading: %s\n"), progname, path, strerror(errno));
+ fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"), progname, path, strerror(errno));
exit(1);
}
}
else
{
- fprintf(stderr, _("%s: lock file %s exists\n"
- "Is a server running? If not, delete the lock file and try again.\n"),
+ fprintf(stderr, _("%s: lock file \"%s\" exists\n"
+ "Is a server running? If not, delete the lock file and try again.\n"),
progname, path);
exit(1);
}
* odds are we've been handed a bad DataDir path, so give up. User
* can do "touch pg_control" to force us to proceed.
*/
- fprintf(stderr, _("%s: could not open %s for reading: %s\n"),
+ fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
progname, ControlFilePath, strerror(errno));
if (errno == ENOENT)
- fprintf(stderr, _("If you are sure the data directory path is correct, do\n"
+ fprintf(stderr, _("If you are sure the data directory path is correct, execute\n"
" touch %s\n"
"and try again.\n"),
ControlFilePath);
len = read(fd, buffer, BLCKSZ);
if (len < 0)
{
- fprintf(stderr, _("%s: could not read %s: %s\n"),
+ fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
progname, ControlFilePath, strerror(errno));
exit(1);
}
printf(_("Maximum length of identifiers: %u\n"), ControlFile.nameDataLen);
printf(_("Maximum number of function arguments: %u\n"), ControlFile.funcMaxArgs);
printf(_("Date/time type storage: %s\n"),
- (ControlFile.enableIntTimes ? _("64-bit integers") : _("Floating point")));
+ (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
printf(_("Maximum length of locale name: %u\n"), ControlFile.localeBuflen);
printf(_("LC_COLLATE: %s\n"), ControlFile.lc_collate);
printf(_("LC_CTYPE: %s\n"), ControlFile.lc_ctype);
xldir = opendir(XLogDir);
if (xldir == NULL)
{
- fprintf(stderr, _("%s: could not open directory %s: %s\n"),
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
progname, XLogDir, strerror(errno));
exit(1);
}
snprintf(path, MAXPGPATH, "%s/%s", XLogDir, xlde->d_name);
if (unlink(path) < 0)
{
- fprintf(stderr, _("%s: could not delete file %s: %s\n"),
+ fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
if (errno)
{
- fprintf(stderr, _("%s: could not read from directory %s: %s\n"),
+ fprintf(stderr, _("%s: could not read from directory \"%s\": %s\n"),
progname, XLogDir, strerror(errno));
exit(1);
}
S_IRUSR | S_IWUSR);
if (fd < 0)
{
- fprintf(stderr, _("%s: could not open %s: %s\n"),
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
/* if write didn't set errno, assume problem is no disk space */
if (errno == 0)
errno = ENOSPC;
- fprintf(stderr, _("%s: could not write %s: %s\n"),
+ fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
{
if (errno == 0)
errno = ENOSPC;
- fprintf(stderr, _("%s: could not write %s: %s\n"),
+ fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.97 2003/06/28 00:12:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.98 2003/07/23 08:47:38 petere Exp $
*/
#include "postgres_fe.h"
#include "command.h"
if (chdir(dir) == -1)
{
- psql_error("\\%s: could not change directory to '%s': %s\n",
+ psql_error("\\%s: could not change directory to \"%s\": %s\n",
cmd, dir, strerror(errno));
success = false;
}
success = saveHistory(fname ? fname : "/dev/tty");
if (success && !quiet && fname)
- printf(gettext("Wrote history to %s.\n"), fname);
+ printf(gettext("Wrote history to file \"%s\".\n"), fname);
free(fname);
}
while ((val = scan_option(&string, OT_NORMAL, NULL, false)))
{
if (status != CMD_UNKNOWN)
- psql_error("\\%s: extra argument '%s' ignored\n", cmd, val);
+ psql_error("\\%s: extra argument \"%s\" ignored\n", cmd, val);
if (val)
free(val);
}
if (!QUIET())
{
if (userparam != new_user) /* no new user */
- printf(gettext("You are now connected to database %s.\n"), dbparam);
+ printf(gettext("You are now connected to database \"%s\".\n"), dbparam);
else if (dbparam != new_dbname) /* no new db */
- printf(gettext("You are now connected as new user %s.\n"), new_user);
+ printf(gettext("You are now connected as new user \"%s\".\n"), new_user);
else
/* both new */
- printf(gettext("You are now connected to database %s as user %s.\n"),
+ printf(gettext("You are now connected to database \"%s\" as user \"%s\".\n"),
PQdb(pset.db), PQuser(pset.db));
}
"%s '%s'", editorName, fname);
result = system(sys);
if (result == -1)
- psql_error("could not start editor %s\n", editorName);
+ psql_error("could not start editor \"%s\"\n", editorName);
else if (result == 127)
psql_error("could not start /bin/sh\n");
free(sys);
if (fd == -1 || !stream)
{
- psql_error("could not open temporary file %s: %s\n", fname, strerror(errno));
+ psql_error("could not open temporary file \"%s\": %s\n", fname, strerror(errno));
error = true;
}
else
popt->nullPrint = xstrdup(value);
}
if (!quiet)
- printf(gettext("Null display is '%s'.\n"), popt->nullPrint ? popt->nullPrint : "");
+ printf(gettext("Null display is \"%s\".\n"), popt->nullPrint ? popt->nullPrint : "");
}
/* field separator for unaligned text */
popt->topt.fieldSep = xstrdup(value);
}
if (!quiet)
- printf(gettext("Field separator is '%s'.\n"), popt->topt.fieldSep);
+ printf(gettext("Field separator is \"%s\".\n"), popt->topt.fieldSep);
}
/* record separator for unaligned text */
if (strcmp(popt->topt.recordSep, "\n") == 0)
printf(gettext("Record separator is <newline>."));
else
- printf(gettext("Record separator is '%s'.\n"), popt->topt.recordSep);
+ printf(gettext("Record separator is \"%s\".\n"), popt->topt.recordSep);
}
}
if (!quiet)
{
if (popt->topt.pager == 1)
- puts(gettext("Pager is on (for long output)."));
+ puts(gettext("Pager is used for long output."));
else if (popt->topt.pager == 2)
- puts(gettext("Pager is always (used)."));
+ puts(gettext("Pager is always used."));
else
- puts(gettext("Pager is off."));
+ puts(gettext("Pager usage is off."));
}
}
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.65 2003/06/28 00:12:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.66 2003/07/23 08:47:39 petere Exp $
*/
#include "postgres_fe.h"
#include "common.h"
while ((notify = PQnotifies(pset.db)))
{
- fprintf(pset.queryFout, gettext("Asynchronous NOTIFY '%s' from backend with pid %d received.\n"),
+ fprintf(pset.queryFout, gettext("Asynchronous notification \"%s\" received from server process with PID %d.\n"),
notify->relname, notify->be_pid);
PQfreemem(notify);
fflush(pset.queryFout);
{
char buf[3];
- printf(gettext("***(Single step mode: Verify query)*********************************************\n"
+ printf(gettext("***(Single step mode: verify command)*******************************************\n"
"%s\n"
"***(press return to proceed or enter x and return to cancel)********************\n"),
query);
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.30 2003/06/28 00:12:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.31 2003/07/23 08:47:39 petere Exp $
*/
#include "postgres_fe.h"
#include "copy.h"
error:
if (token)
- psql_error("\\copy: parse error at '%s'\n", token);
+ psql_error("\\copy: parse error at \"%s\"\n", token);
else
psql_error("\\copy: parse error at end of line\n");
free_copy_options(result);
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.78 2003/06/27 16:55:22 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.79 2003/07/23 08:47:39 petere Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
if (PQntuples(res) == 0)
{
if (!QUIET())
- fprintf(stderr, _("Did not find any relation with oid %s.\n"),
+ fprintf(stderr, _("Did not find any relation with OID %s.\n"),
oid);
goto error_return;
}
const char *indexdef;
const char *usingpos;
- /* Output index/constraint name */
- printfPQExpBuffer(&buf, " \"%s\"",
+ /* Output index name */
+ printfPQExpBuffer(&buf, _(" \"%s\""),
PQgetvalue(result1, i, 0));
/* Label as primary key or unique (but not both) */
appendPQExpBuffer(&buf,
strcmp(PQgetvalue(result1, i, 1), "t") == 0
- ? _(" PRIMARY KEY") :
+ ? _(" primary key,") :
(strcmp(PQgetvalue(result1, i, 2), "t") == 0
- ? _(" UNIQUE")
+ ? _(" unique,")
: ""));
/* Everything after "USING" is echoed verbatim */
appendPQExpBuffer(&buf, " %s", indexdef);
- if (i < index_count - 1)
- appendPQExpBuffer(&buf, ",");
-
footers[count_footers++] = xstrdup(buf.data);
}
}
/* print check constraints */
if (check_count > 0) {
- printfPQExpBuffer(&buf, _("Check Constraints:"));
+ printfPQExpBuffer(&buf, _("Check constraints:"));
footers[count_footers++] = xstrdup(buf.data);
for (i = 0; i < check_count; i++)
{
printfPQExpBuffer(&buf, _(" \"%s\" CHECK %s"),
PQgetvalue(result2, i, 1),
PQgetvalue(result2, i, 0));
- if (i < check_count - 1)
- appendPQExpBuffer(&buf, ",");
footers[count_footers++] = xstrdup(buf.data);
}
/* print foreign key constraints */
if (foreignkey_count > 0) {
- printfPQExpBuffer(&buf, _("Foreign Key Constraints:"));
+ printfPQExpBuffer(&buf, _("Foreign-key constraints:"));
footers[count_footers++] = xstrdup(buf.data);
for (i = 0; i < foreignkey_count; i++)
{
printfPQExpBuffer(&buf, _(" \"%s\" %s"),
PQgetvalue(result5, i, 0),
PQgetvalue(result5, i, 1));
- if (i < foreignkey_count - 1)
- appendPQExpBuffer(&buf, ",");
footers[count_footers++] = xstrdup(buf.data);
}
printfPQExpBuffer(&buf, " %s", ruledef);
- if (i < rule_count - 1)
- appendPQExpBuffer(&buf, ",");
-
footers[count_footers++] = xstrdup(buf.data);
}
}
printfPQExpBuffer(&buf, " %s", tgdef);
- if (i < trigger_count - 1)
- appendPQExpBuffer(&buf, ",");
-
footers[count_footers++] = xstrdup(buf.data);
}
}
"FROM pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p\n"
" ON c.castfunc = p.oid\n"
"ORDER BY 1, 2",
- _("Source"),
- _("Target"),
- _("BINARY"),
+ _("Source type"),
+ _("Target type"),
+ _("(binary compatible)"),
_("Function"),
_("no"),
_("in assignment"),
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.73 2003/06/11 05:13:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.74 2003/07/23 08:47:39 petere Exp $
*/
#include "postgres_fe.h"
#include "common.h"
env = getenv("PGDATABASE");
if (!env)
env = user;
- printf(_(" -d DBNAME specify database name to connect to (default: %s)\n"), env);
+ printf(_(" -d DBNAME specify database name to connect to (default: \"%s\")\n"), env);
puts(_(" -c COMMAND run only single command (SQL or internal) and exit"));
puts(_(" -f FILENAME execute commands from file, then exit"));
puts(_(" -l list available databases, then exit"));
- puts(_(" -v NAME=VALUE set psql variable 'NAME' to 'VALUE'"));
+ puts(_(" -v NAME=VALUE set psql variable NAME to VALUE"));
puts(_(" -X do not read startup file (~/.psqlrc)"));
puts(_(" --help show this help, then exit"));
puts(_(" --version output version information, then exit"));
puts(_(" -q run quietly (no messages, only query output)"));
puts(_(" -o FILENAME send query results to file (or |pipe)"));
puts(_(" -n disable enhanced command line editing (readline)"));
- puts(_(" -s single step mode (confirm each query)"));
- puts(_(" -S single line mode (end of line terminates SQL command)"));
+ puts(_(" -s single-step mode (confirm each query)"));
+ puts(_(" -S single-line mode (end of line terminates SQL command)"));
puts(_("\nOutput format options:"));
puts(_(" -A unaligned table output mode (-P format=unaligned)"));
puts(_(" -t print rows only (-P tuples_only)"));
puts(_(" -T TEXT set HTML table tag attributes (width, border) (-P tableattr=)"));
puts(_(" -x turn on expanded table output (-P expanded)"));
- puts(_(" -P VAR[=ARG] set printing option 'VAR' to 'ARG' (see \\pset command)"));
+ puts(_(" -P VAR[=ARG] set printing option VAR to ARG (see \\pset command)"));
printf(_(" -F STRING set field separator (default: \"%s\") (-P fieldsep=)\n"),
DEFAULT_FIELD_SEP);
puts(_(" -R STRING set record separator (default: newline) (-P recordsep=)"));
puts(_("\nConnection options:"));
/* Display default host */
env = getenv("PGHOST");
- printf(_(" -h HOSTNAME specify database server host or socket directory (default: %s)\n"),
+ printf(_(" -h HOSTNAME database server host or socket directory (default: \"%s\")\n"),
env ? env : _("local socket"));
/* Display default port */
env = getenv("PGPORT");
- printf(_(" -p PORT specify database server port (default: %s)\n"),
+ printf(_(" -p PORT database server port (default: \"%s\")\n"),
env ? env : DEF_PGPORT_STR);
/* Display default user */
env = getenv("PGUSER");
if (!env)
env = user;
- printf(_(" -U NAME specify database user name (default: %s)\n"), env);
+ printf(_(" -U NAME database user name (default: \"%s\")\n"), env);
puts(_(" -W prompt for password (should happen automatically)"));
puts(_(
PQdb(pset.db));
fprintf(output, _(" \\cd [DIR] change the current working directory\n"));
fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
- fprintf(output, _(" \\encoding [ENCODING] show or set client encoding\n"));
+ fprintf(output, _(" \\encoding [ENCODING]\n"
+ " show or set client encoding\n"));
fprintf(output, _(" \\h [NAME] help on syntax of SQL commands, * for all commands\n"));
fprintf(output, _(" \\q quit psql\n"));
- fprintf(output, _(" \\set [NAME [VALUE]] set internal variable, or list all if no parameters\n"));
+ fprintf(output, _(" \\set [NAME [VALUE]]\n"
+ " set internal variable, or list all if no parameters\n"));
fprintf(output, _(" \\timing toggle timing of commands (currently %s)\n"),
ON(pset.timing));
fprintf(output, _(" \\unset NAME unset (delete) internal variable\n"));
fprintf(output, _(" \\! [COMMAND] execute command in shell or start interactive shell\n"));
- fprintf(output, _("\n"));
+ fprintf(output, "\n");
fprintf(output, _("Query Buffer\n"));
fprintf(output, _(" \\e [FILE] edit the query buffer (or file) with external editor\n"));
fprintf(output, _(" \\r reset (clear) the query buffer\n"));
fprintf(output, _(" \\s [FILE] display history or save it to file\n"));
fprintf(output, _(" \\w [FILE] write query buffer to file\n"));
- fprintf(output, _("\n"));
+ fprintf(output, "\n");
fprintf(output, _("Input/Output\n"));
+ fprintf(output, _(" \\echo [STRING] write string to standard output\n"));
fprintf(output, _(" \\i FILE execute commands from file\n"));
fprintf(output, _(" \\o [FILE] send all query results to file or |pipe\n"));
- fprintf(output, _("\n"));
+ fprintf(output, _(" \\qecho [STRING]\n"
+ " write string to query output stream (see \\o)\n"));
+ fprintf(output, "\n");
fprintf(output, _("Informational\n"));
fprintf(output, _(" \\d [NAME] describe table, index, sequence, or view\n"));
fprintf(output, _(" \\du [PATTERN] list users\n"));
fprintf(output, _(" \\l list all databases (add \"+\" for more detail)\n"));
fprintf(output, _(" \\z [PATTERN] list table access privileges (same as \\dp)\n"));
- fprintf(output, _("\n"));
+ fprintf(output, "\n");
fprintf(output, _("Formatting\n"));
fprintf(output, _(" \\a toggle between unaligned and aligned output mode\n"));
fprintf(output, _(" \\C [STRING] set table title, or unset if none\n"));
- fprintf(output, _(" \\echo [STRING] write string to standard output\n"));
fprintf(output, _(" \\f [STRING] show or set field separator for unaligned query output\n"));
fprintf(output, _(" \\H toggle HTML output mode (currently %s)\n"),
ON(pset.popt.topt.format == PRINT_HTML));
- fprintf(output, _(" \\pset NAME [VALUE] set table output option\n"
+ fprintf(output, _(" \\pset NAME [VALUE]\n"
+ " set table output option\n"
" (NAME := {format|border|expanded|fieldsep|null|recordsep|\n"
" tuples_only|title|tableattr|pager})\n"));
- fprintf(output, _(" \\qecho [STRING] write string to query output stream (see \\o)\n"));
fprintf(output, _(" \\t show only rows (currently %s)\n"),
ON(pset.popt.topt.tuples_only));
fprintf(output, _(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n"));
fprintf(output, _(" \\x toggle expanded output (currently %s)\n"),
ON(pset.popt.topt.expanded));
- fprintf(output, _("\n"));
+ fprintf(output, "\n");
fprintf(output, _("Copy, Large Object\n"));
fprintf(output, _(" \\copy ... perform SQL COPY with data stream to the client host\n"));
- fprintf(output, _(" \\lo_export\n"));
- fprintf(output, _(" \\lo_import\n"));
- fprintf(output, _(" \\lo_list\n"));
- fprintf(output, _(" \\lo_unlink large object operations\n"));
+ fprintf(output, _(" \\lo_export\n"
+ " \\lo_import\n"
+ " \\lo_list\n"
+ " \\lo_unlink large object operations\n"));
if (output != stdout)
{
}
if (!help_found)
- printf(_("No help available for '%-.*s'.\nTry \\h with no arguments to see available help.\n"), (int) len, topic);
+ printf(_("No help available for \"%-.*s\".\nTry \\h with no arguments to see available help.\n"), (int) len, topic);
}
}
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.23 2003/03/20 06:43:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.24 2003/07/23 08:47:39 petere Exp $
*/
#include "postgres_fe.h"
#include "input.h"
if (write_history(fname) == 0)
return true;
- psql_error("could not save history to %s: %s\n", fname, strerror(errno));
+ psql_error("could not save history to file \"%s\": %s\n", fname, strerror(errno));
}
#endif
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.74 2003/06/28 00:12:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.75 2003/07/23 08:47:40 petere Exp $
*/
#include "postgres_fe.h"
if (!result)
{
- fprintf(stderr, gettext("%s: couldn't set printing parameter %s\n"), pset.progname, value);
+ fprintf(stderr, gettext("%s: couldn't set printing parameter \"%s\"\n"), pset.progname, value);
exit(EXIT_FAILURE);
}
{
if (!DeleteVariable(pset.vars, value))
{
- fprintf(stderr, gettext("%s: could not delete variable %s\n"),
+ fprintf(stderr, gettext("%s: could not delete variable \"%s\"\n"),
pset.progname, value);
exit(EXIT_FAILURE);
}
*equal_loc = '\0';
if (!SetVariable(pset.vars, value, equal_loc + 1))
{
- fprintf(stderr, gettext("%s: could not set variable %s\n"),
+ fprintf(stderr, gettext("%s: could not set variable \"%s\"\n"),
pset.progname, value);
exit(EXIT_FAILURE);
}
/* unknown option reported by getopt */
else
{
- fprintf(stderr, gettext("Try '%s --help' for more information.\n"),
+ fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
pset.progname);
exit(EXIT_FAILURE);
}
break;
default:
- fprintf(stderr, gettext("Try '%s --help' for more information.\n"),
+ fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
pset.progname);
exit(EXIT_FAILURE);
break;
else if (!options->username)
options->username = argv[optind];
else if (!QUIET())
- fprintf(stderr, gettext("%s: warning: extra option %s ignored\n"),
+ fprintf(stderr, gettext("%s: warning: extra command-line argument \"%s\" ignored\n"),
pset.progname, argv[optind]);
optind++;
*
* Portions Copyright (c) 2002-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/clusterdb.c,v 1.1 2003/06/18 12:19:11 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/clusterdb.c,v 1.2 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
table = optarg;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
dbname = argv[optind];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 1]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
static void
help(const char *progname)
{
- printf(_("%s clusters all previously clustered tables in a database.\n"), progname);
+ printf(_("%s clusters all previously clustered tables in a database.\n\n"), progname);
printf(_("Usage:\n"));
printf(_(" %s [OPTION]... [DBNAME]\n"), progname);
printf(_("\nOptions:\n"));
printf(_(" -a, --all cluster all databases\n"));
printf(_(" -d, --dbname=DBNAME database to cluster\n"));
- printf(_(" -t, --table=TABLE cluster specific table only"));
+ printf(_(" -t, --table=TABLE cluster specific table only\n"));
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -q, --quiet don't write any messages\n"));
printf(_(" --help show this help, then exit\n"));
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/createdb.c,v 1.3 2003/06/11 05:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/createdb.c,v 1.4 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
encoding = optarg;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
comment = argv[optind + 1];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 2]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/createlang.c,v 1.4 2003/06/30 18:31:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/createlang.c,v 1.5 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
echo = true;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
if (argc - optind > 0)
{
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (langname == NULL)
{
fprintf(stderr, _("%s: missing required argument language name\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/createuser.c,v 1.4 2003/06/11 05:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/createuser.c,v 1.5 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
encrypted = -1;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
newuser = argv[optind];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 1]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/dropdb.c,v 1.4 2003/06/11 05:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/dropdb.c,v 1.5 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
interactive = true;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
{
case 0:
fprintf(stderr, _("%s: missing required argument database name\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
case 1:
dbname = argv[optind];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 1]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
{
char *reply;
- printf(_("Database \"%s\" will be permanently deleted.\n"), dbname);
+ printf(_("Database \"%s\" will be permanently removed.\n"), dbname);
reply = simple_prompt("Are you sure? (y/n) ", 1, true);
if (check_yesno_response(reply) != 1)
exit(0);
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/droplang.c,v 1.3 2003/06/11 05:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/droplang.c,v 1.4 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
echo = true;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
if (argc - optind > 0)
{
- fprintf(stderr, _("%s: too many command line options (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (langname == NULL)
{
fprintf(stderr, _("%s: missing required argument language name\n"), progname);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
{
PQfinish(conn);
fprintf(stderr,
- _("%s: There are %s functions declared in language \"%s\". Language not removed.\n"),
+ _("%s: still %s functions declared in language \"%s\"; language not removed\n"),
progname, PQgetvalue(result, 0, 0), langname);
exit(1);
}
printf(_("Usage:\n"));
printf(_(" %s [OPTION]... LANGNAME [DBNAME]\n"), progname);
printf(_("\nOptions:\n"));
- printf(_(" -d, --dbname=DBNAME database to install language in\n"));
+ printf(_(" -d, --dbname=DBNAME database from which to remove the language\n"));
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -l, --list show a list of currently installed languages\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/dropuser.c,v 1.4 2003/06/11 05:13:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/dropuser.c,v 1.5 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
interactive = true;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
dropuser = argv[optind];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 1]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
{
char *reply;
- printf(_("User \"%s\" will be permanently deleted.\n"), dropuser);
+ printf(_("User \"%s\" will be permanently removed.\n"), dropuser);
reply = simple_prompt("Are you sure? (y/n) ", 1, true);
if (check_yesno_response(reply) != 1)
exit(0);
if (PQresultStatus(result) != PGRES_COMMAND_OK)
{
- fprintf(stderr, _("%s: deletion of user %s failed: %s"),
+ fprintf(stderr, _("%s: removal of user \"%s\" failed: %s"),
progname, dropuser, PQerrorMessage(conn));
PQfinish(conn);
exit(1);
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/bin/scripts/vacuumdb.c,v 1.1 2003/06/18 12:19:11 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/scripts/vacuumdb.c,v 1.2 2003/07/23 08:47:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
verbose = true;
break;
default:
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}
dbname = argv[optind];
break;
default:
- fprintf(stderr, _("%s: too many command-line arguments (first is '%s')\n"),
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
progname, argv[optind + 1]);
- fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}