Apply message style guide to frontend programs.

This commit is contained in:
Peter Eisentraut 2003-07-23 08:47:41 +00:00
parent a0743b132e
commit c154fc3a20
30 changed files with 325 additions and 331 deletions

View File

@ -27,7 +27,7 @@
# 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 $
#
#-------------------------------------------------------------------------
@ -39,14 +39,14 @@
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
}
@ -135,7 +135,7 @@ elif [ -x "$bindir/postgres" ]; then
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
@ -147,8 +147,8 @@ elif [ -x "$bindir/postgres" ]; 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
@ -156,8 +156,8 @@ 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
@ -170,8 +170,9 @@ 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
@ -215,14 +216,14 @@ do
;;
--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)
@ -319,7 +320,7 @@ do
-*)
echo "$CMDNAME: invalid option: $1"
echo "Try '$CMDNAME --help' for more information."
echo "Try \"$CMDNAME --help\" for more information."
exit 1
;;
@ -381,7 +382,7 @@ then
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
@ -394,9 +395,10 @@ 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
@ -417,7 +419,7 @@ if [ "$show_setting" = yes ] || [ "$debug" = yes ]
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 \
@ -436,9 +438,9 @@ for PREREQ_FILE in "$POSTGRES_BKI" "$POSTGRES_DESCR" \
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
@ -448,9 +450,8 @@ for file in "$POSTGRES_BKI"
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
@ -493,10 +494,10 @@ pgdata_contents=`ls -A "$PGDATA" 2>/dev/null`
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
@ -505,7 +506,7 @@ 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"
@ -685,7 +686,7 @@ EOF
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"

View File

@ -9,12 +9,12 @@
#
#
# 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
}
@ -25,8 +25,9 @@ EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
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
@ -52,7 +53,7 @@ do
-*)
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
;;
*)
@ -79,7 +80,7 @@ fi
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
@ -112,8 +113,8 @@ else
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
# -----------------------------------------------------------------------
@ -127,29 +128,29 @@ trap 'echo "Caught signal." ; exit_nicely' 1 2 3 15
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

View File

@ -1,6 +1,6 @@
#!/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`
@ -22,8 +22,9 @@ fi
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
@ -39,7 +40,7 @@ EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
#
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*
@ -52,7 +53,7 @@ if [ `uname` = 'Linux' ]; then
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

View File

@ -7,7 +7,7 @@
# 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`
@ -41,7 +41,7 @@ Options:
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

View File

@ -6,7 +6,7 @@
* 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"
@ -25,6 +25,7 @@
static void
usage(const char *progname)
{
printf(_("%s displays control information of a PostgreSQL database cluster.\n\n"), progname);
printf
(
_(
@ -32,13 +33,12 @@ usage(const char *progname)
" %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"));
}
@ -105,7 +105,7 @@ main(int argc, char *argv[])
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);
}
@ -113,14 +113,14 @@ main(int argc, char *argv[])
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);
}
@ -170,7 +170,7 @@ main(int argc, char *argv[])
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);

View File

@ -8,7 +8,7 @@
#
#
# 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 $
#
#-------------------------------------------------------------------------
@ -54,7 +54,7 @@ Shutdown modes are:
Report bugs to <pgsql-bugs@postgresql.org>."
advice="\
Try '$CMDNAME --help' for more information."
Try \"$CMDNAME --help\" for more information."
# Placed here during build
@ -103,8 +103,8 @@ if [ -x "$self_path/postmaster" ] && [ -x "$self_path/psql" ]; then
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
@ -202,7 +202,7 @@ if [ x"$op" = x"" ];then
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
@ -248,15 +248,15 @@ if [ "$op" = "status" ];then
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
@ -266,7 +266,7 @@ if [ "$op" = "stop" -o "$op" = "restart" -o "$op" = "reload" ];then
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

View File

@ -11,7 +11,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -71,7 +71,7 @@ dumpSchema(Archive *fout,
OpclassInfo *opcinfo;
if (g_verbose)
write_msg(NULL, "reading namespaces\n");
write_msg(NULL, "reading schemas\n");
nsinfo = getNamespaces(&numNamespaces);
if (g_verbose)
@ -125,7 +125,7 @@ dumpSchema(Archive *fout,
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);
}
@ -449,7 +449,7 @@ findOprByOid(OprInfo *oprinfo, int numOprs, const char *oid)
}
/* 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);
@ -499,12 +499,12 @@ findParentsByOid(TableInfo *tblinfo, int numTables,
{
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);
@ -542,7 +542,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
{
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';
@ -557,7 +557,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
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;

View File

@ -15,7 +15,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -119,7 +119,7 @@ CloseArchive(Archive *AHX)
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 */
@ -259,7 +259,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
/* 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);
}
}
@ -284,7 +284,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
{
#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);
@ -304,7 +304,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
* 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
{
@ -317,7 +317,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
_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
@ -364,18 +364,18 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
/* 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;
}
@ -584,7 +584,7 @@ WriteData(Archive *AHX, const void *data, size_t dLen)
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);
}
@ -708,7 +708,7 @@ StartBlob(Archive *AHX, Oid oid)
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);
@ -748,7 +748,7 @@ EndRestoreBlobs(ArchiveHandle *AH)
{
if (AH->txActive)
{
ahlog(AH, 2, "committing large object transactions\n");
ahlog(AH, 2, "committing large-object transactions\n");
CommitTransaction(AH);
}
@ -786,7 +786,7 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid)
*/
if (!AH->txActive)
{
ahlog(AH, 2, "starting large object transactions\n");
ahlog(AH, 2, "starting large-object transactions\n");
StartTransaction(AH);
}
if (!AH->blobTxActive)
@ -796,7 +796,7 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid)
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);
@ -817,7 +817,7 @@ EndRestoreBlob(ArchiveHandle *AH, Oid oid)
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",
@ -833,7 +833,7 @@ EndRestoreBlob(ArchiveHandle *AH, Oid oid)
*/
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);
}
@ -985,7 +985,7 @@ SortTocFromFile(Archive *AHX, RestoreOptions *ropt)
/* 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;
@ -1775,7 +1775,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
break;
default:
die_horribly(AH, modulename, "unrecognized file format '%d'\n", fmt);
die_horribly(AH, modulename, "unrecognized file format \"%d\"\n", fmt);
}
return AH;
@ -1888,7 +1888,7 @@ ReadToc(ArchiveHandle *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);
@ -1945,7 +1945,7 @@ ReadToc(ArchiveHandle *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;
@ -2071,7 +2071,7 @@ _doSetSessionAuth(ArchiveHandle *AH, const char *user)
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);
@ -2185,7 +2185,7 @@ _selectOutputSchema(ArchiveHandle *AH, const char *schemaName)
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);
@ -2246,7 +2246,7 @@ WriteHead(ArchiveHandle *AH)
#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
@ -2327,7 +2327,7 @@ ReadHead(ArchiveHandle *AH)
#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)

View File

@ -19,7 +19,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -177,7 +177,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
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);
}
@ -188,7 +188,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
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);
@ -444,7 +444,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
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)
{
@ -476,7 +476,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
/* 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)
@ -551,7 +551,7 @@ _PrintData(ArchiveHandle *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;
@ -569,7 +569,7 @@ _PrintData(ArchiveHandle *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);
@ -599,7 +599,7 @@ _PrintData(ArchiveHandle *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);
@ -674,7 +674,7 @@ _skipData(ArchiveHandle *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;

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -45,7 +45,7 @@ _parse_version(ArchiveHandle *AH, const char *versionString)
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;
}
@ -148,7 +148,7 @@ _connectDB(ArchiveHandle *AH, const char *reqdb, const char *requser)
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)
{
@ -585,7 +585,7 @@ FixupBlobRefs(ArchiveHandle *AH, TocEntry *te)
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)

View File

@ -16,7 +16,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -374,7 +374,7 @@ tarOpen(ArchiveHandle *AH, const char *filename, char mode)
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
@ -504,7 +504,7 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
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
@ -636,7 +636,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
*/
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++)
@ -654,7 +654,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
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]' */
@ -1316,6 +1316,6 @@ _tarWriteHeader(TAR_MEMBER *th)
}
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");
}

View File

@ -12,7 +12,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -379,7 +379,7 @@ main(int argc, char **argv)
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;
@ -393,17 +393,17 @@ main(int argc, char **argv)
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);
}
@ -413,40 +413,40 @@ main(int argc, char **argv)
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);
}
@ -482,7 +482,7 @@ main(int argc, char **argv)
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);
}
@ -493,7 +493,7 @@ main(int argc, char **argv)
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);
}
@ -679,7 +679,7 @@ help(const char *progname)
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"));
}
@ -1420,7 +1420,7 @@ getNamespaces(int *numNamespaces)
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();
}
@ -1444,7 +1444,7 @@ getNamespaces(int *numNamespaces)
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);
}
@ -1461,7 +1461,7 @@ getNamespaces(int *numNamespaces)
/* 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();
}
@ -1498,7 +1498,7 @@ findNamespace(const char *nsoid, const char *objoid)
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
@ -1623,7 +1623,7 @@ getTypes(int *numTypes)
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);
}
@ -2255,7 +2255,7 @@ getTables(int *numTables)
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();
}
@ -2283,7 +2283,7 @@ getTables(int *numTables)
/* 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();
}
@ -2414,7 +2414,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
* 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);
@ -2527,7 +2527,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
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);
@ -2570,7 +2570,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
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();
}
@ -2687,7 +2687,7 @@ dumpComment(Archive *fout, const char *target,
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();
}
@ -2854,7 +2854,7 @@ dumpDBComment(Archive *fout)
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();
}
@ -3051,7 +3051,7 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
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();
}
@ -3397,7 +3397,7 @@ dumpOneCompositeType(Archive *fout, TypeInfo *tinfo)
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();
}
@ -3405,7 +3405,7 @@ dumpOneCompositeType(Archive *fout, TypeInfo *tinfo)
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();
}
@ -3571,7 +3571,7 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
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();
}
@ -3581,7 +3581,7 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
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();
}
@ -3799,7 +3799,7 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo)
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();
}
@ -3875,7 +3875,7 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo)
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();
}
@ -4932,7 +4932,7 @@ dumpACL(Archive *fout, const char *type, const char *name,
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();
}
@ -5113,7 +5113,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
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();
}
@ -5260,7 +5260,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
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);
@ -5487,7 +5487,7 @@ getAttrName(int attrnum, TableInfo *tblInfo)
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 */
@ -5748,7 +5748,7 @@ setMaxOid(Archive *fout)
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);
@ -5761,7 +5761,7 @@ setMaxOid(Archive *fout)
}
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"
@ -5798,7 +5798,7 @@ findLastBuiltinOid_V71(const char *dbname)
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);
@ -5843,12 +5843,12 @@ findLastBuiltinOid_V70(void)
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")));
@ -6051,7 +6051,7 @@ dumpConstraints(Archive *fout, TableInfo *tblinfo, int numTables)
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);
/*
@ -6162,7 +6162,7 @@ dumpTriggers(Archive *fout, TableInfo *tblinfo, int numTables)
continue;
if (g_verbose)
write_msg(NULL, "dumping triggers for table %s\n",
write_msg(NULL, "dumping triggers for table \"%s\"\n",
tbinfo->relname);
/*
@ -6332,7 +6332,7 @@ dumpTriggers(Archive *fout, TableInfo *tblinfo, int numTables)
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();
}
@ -6376,7 +6376,7 @@ dumpTriggers(Archive *fout, TableInfo *tblinfo, int numTables)
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);
@ -6582,7 +6582,7 @@ selectSourceSchema(const char *schemaName)
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();
}
@ -6644,7 +6644,7 @@ getFormattedTypeName(const char *oid, OidOptions opts)
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();
}
@ -6653,7 +6653,7 @@ getFormattedTypeName(const char *oid, OidOptions opts)
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();
}

View File

@ -6,7 +6,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -189,17 +189,17 @@ main(int argc, char *argv[])
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);
}
@ -494,7 +494,7 @@ dumpCreateDB(PGconn *conn)
!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);
@ -641,7 +641,7 @@ dumpDatabases(PGconn *conn)
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);
}
}
@ -676,7 +676,7 @@ runPgDump(const char *dbname)
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);
@ -717,7 +717,7 @@ connectDatabase(const char *dbname, const char *pghost, const char *pgport,
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);
}
@ -740,7 +740,7 @@ connectDatabase(const char *dbname, const char *pghost, const char *pgport,
/* 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);
}

View File

@ -34,7 +34,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -273,7 +273,7 @@ main(int argc, char **argv)
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;
@ -283,7 +283,7 @@ main(int argc, char **argv)
break;
default:
fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
}

View File

@ -23,7 +23,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -138,8 +138,8 @@ main(int argc, char *argv[])
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)
@ -153,8 +153,8 @@ main(int argc, char *argv[])
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)
@ -168,21 +168,21 @@ main(int argc, char *argv[])
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);
}
}
@ -190,7 +190,7 @@ main(int argc, char *argv[])
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);
}
@ -209,14 +209,14 @@ main(int argc, char *argv[])
{
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);
}
@ -305,10 +305,10 @@ ReadControlFile(void)
* 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);
@ -321,7 +321,7 @@ ReadControlFile(void)
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);
}
@ -449,7 +449,7 @@ PrintControlValues(bool guessed)
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);
@ -557,7 +557,7 @@ KillExistingXLOG(void)
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);
}
@ -571,7 +571,7 @@ KillExistingXLOG(void)
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);
}
@ -581,7 +581,7 @@ KillExistingXLOG(void)
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);
}
@ -644,7 +644,7 @@ WriteEmptyXLOG(void)
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);
}
@ -655,7 +655,7 @@ WriteEmptyXLOG(void)
/* 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);
}
@ -669,7 +669,7 @@ WriteEmptyXLOG(void)
{
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);
}

View File

@ -3,7 +3,7 @@
*
* 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"
@ -303,7 +303,7 @@ exec_command(const char *cmd,
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;
}
@ -665,7 +665,7 @@ exec_command(const char *cmd,
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);
}
@ -887,7 +887,7 @@ exec_command(const char *cmd,
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);
}
@ -1425,12 +1425,12 @@ do_connect(const char *new_dbname, const char *new_user)
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));
}
@ -1552,7 +1552,7 @@ editFile(const char *fname)
"%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);
@ -1599,7 +1599,7 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
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
@ -1828,7 +1828,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
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 */
@ -1840,7 +1840,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
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 */
@ -1856,7 +1856,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
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);
}
}
@ -1921,11 +1921,11 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
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."));
}
}

View File

@ -3,7 +3,7 @@
*
* 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"
@ -425,7 +425,7 @@ PrintNotifications(void)
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);
@ -585,7 +585,7 @@ SendQuery(const char *query)
{
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);

View File

@ -3,7 +3,7 @@
*
* 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"
@ -287,7 +287,7 @@ parse_slash_copy(const char *args)
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);

View File

@ -3,7 +3,7 @@
*
* 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"
@ -678,7 +678,7 @@ describeOneTableDetails(const char *schemaname,
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;
}
@ -1049,16 +1049,16 @@ describeOneTableDetails(const char *schemaname,
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 */
@ -1069,24 +1069,19 @@ describeOneTableDetails(const char *schemaname,
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);
}
@ -1094,15 +1089,13 @@ describeOneTableDetails(const char *schemaname,
/* 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);
}
@ -1122,9 +1115,6 @@ describeOneTableDetails(const char *schemaname,
printfPQExpBuffer(&buf, " %s", ruledef);
if (i < rule_count - 1)
appendPQExpBuffer(&buf, ",");
footers[count_footers++] = xstrdup(buf.data);
}
}
@ -1146,9 +1136,6 @@ describeOneTableDetails(const char *schemaname,
printfPQExpBuffer(&buf, " %s", tgdef);
if (i < trigger_count - 1)
appendPQExpBuffer(&buf, ",");
footers[count_footers++] = xstrdup(buf.data);
}
}
@ -1496,9 +1483,9 @@ listCasts(const char *pattern)
"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"),

View File

@ -3,7 +3,7 @@
*
* 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"
@ -90,11 +90,11 @@ usage(void)
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"));
@ -106,8 +106,8 @@ usage(void)
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)"));
@ -115,7 +115,7 @@ usage(void)
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=)"));
@ -123,17 +123,17 @@ usage(void)
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(_(
@ -177,15 +177,17 @@ slashUsage(unsigned short int pager)
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"));
@ -194,12 +196,15 @@ slashUsage(unsigned short int pager)
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"));
@ -219,32 +224,31 @@ slashUsage(unsigned short int pager)
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)
{
@ -323,7 +327,7 @@ helpSQL(const char *topic, unsigned short int pager)
}
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);
}
}

View File

@ -3,7 +3,7 @@
*
* 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"
@ -204,7 +204,7 @@ saveHistory(char *fname)
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

View File

@ -3,7 +3,7 @@
*
* 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"
@ -421,7 +421,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
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);
}
@ -467,7 +467,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
{
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);
}
@ -477,7 +477,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
*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);
}
@ -508,13 +508,13 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
/* 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;
@ -532,7 +532,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
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++;

View File

@ -4,7 +4,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -91,7 +91,7 @@ main(int argc, char *argv[])
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);
}
}
@ -104,9 +104,9 @@ main(int argc, char *argv[])
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);
}
@ -224,13 +224,13 @@ void cluster_all_databases(const char *host, const char *port, const char *usern
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"));

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -98,7 +98,7 @@ main(int argc, char *argv[])
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);
}
}
@ -115,9 +115,9 @@ main(int argc, char *argv[])
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);
}

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -91,7 +91,7 @@ main(int argc, char *argv[])
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);
}
}
@ -110,9 +110,9 @@ main(int argc, char *argv[])
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);
}
@ -154,7 +154,7 @@ main(int argc, char *argv[])
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);
}

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -113,7 +113,7 @@ main(int argc, char *argv[])
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);
}
}
@ -126,9 +126,9 @@ main(int argc, char *argv[])
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);
}

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -80,7 +80,7 @@ main(int argc, char *argv[])
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);
}
}
@ -89,15 +89,15 @@ main(int argc, char *argv[])
{
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);
}
@ -105,7 +105,7 @@ main(int argc, char *argv[])
{
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);

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -85,7 +85,7 @@ main(int argc, char *argv[])
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);
}
}
@ -104,9 +104,9 @@ main(int argc, char *argv[])
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);
}
@ -148,7 +148,7 @@ main(int argc, char *argv[])
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);
}
@ -182,7 +182,7 @@ main(int argc, char *argv[])
{
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);
}
@ -241,7 +241,7 @@ help(const char *progname)
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"));

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -80,7 +80,7 @@ main(int argc, char *argv[])
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);
}
}
@ -93,9 +93,9 @@ main(int argc, char *argv[])
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);
}
@ -106,7 +106,7 @@ main(int argc, char *argv[])
{
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);
@ -123,7 +123,7 @@ main(int argc, char *argv[])
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);

View File

@ -5,7 +5,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -107,7 +107,7 @@ main(int argc, char *argv[])
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);
}
}
@ -120,9 +120,9 @@ main(int argc, char *argv[])
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);
}