diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 5da06fddce..b64ba6c156 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,5 +1,5 @@ Run-time Configuration @@ -2295,7 +2295,8 @@ SELECT * FROM parent WHERE key = 2400; Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, NOTICE, - WARNING, and ERROR. Each level + WARNING, ERROR, FATAL, + and PANIC. Each level includes all the levels that follow it. The later the level, the fewer messages are sent. The default is NOTICE. Note that LOG has a different diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 9b087adf01..886bcde178 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.106 2005/10/04 19:01:18 petere Exp $ + * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.107 2005/10/13 20:58:42 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -681,7 +681,10 @@ AcceptResult(const PGresult *result, const char *query) if (!OK) { - psql_error("%s", PQerrorMessage(pset.db)); + const char *error = PQerrorMessage(pset.db); + if (strlen(error)) + psql_error("%s", error); + ReportSyntaxErrorPosition(result, query); CheckConnection(); }