Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ac3862

Browse files
committed
The patch updates the documentation to reflect the fact that higher values
of client_min_messages (fatal + panic) are valid and also fixes a slightissue with how psql tried to display error messages that aren't sent tothe client.We often tell people to ignore errors in response to requests for thingslike "drop if exists", but there's no good way to completely hide thiswithout upping client_min_messages past ERROR. When running a file likeSET client_min_messages TO 'FATAL';DROP TABLE doesntexist;with "psql -f filename" you get an error prefix of"psql:/home/username/filename:3" even though there is no error message toprefix because it isn't sent to the client.Kris Jurka
1 parent4784794 commit8ac3862

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.26 2005/10/1317:32:42 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.27 2005/10/1320:58:42 momjian Exp $
33
-->
44
<chapter Id="runtime-config">
55
<title>Run-time Configuration</title>
@@ -2295,7 +2295,8 @@ SELECT * FROM parent WHERE key = 2400;
22952295
Valid values are <literal>DEBUG5</>,
22962296
<literal>DEBUG4</>, <literal>DEBUG3</>, <literal>DEBUG2</>,
22972297
<literal>DEBUG1</>, <literal>LOG</>, <literal>NOTICE</>,
2298-
<literal>WARNING</>, and <literal>ERROR</>. Each level
2298+
<literal>WARNING</>, <literal>ERROR</>, <literal>FATAL</>,
2299+
and <literal>PANIC</>. Each level
22992300
includes all the levels that follow it. The later the level,
23002301
the fewer messages are sent. The default is
23012302
<literal>NOTICE</>. Note that <literal>LOG</> has a different

‎src/bin/psql/common.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.106 2005/10/04 19:01:18 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.107 2005/10/13 20:58:42 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -681,7 +681,10 @@ AcceptResult(const PGresult *result, const char *query)
681681

682682
if (!OK)
683683
{
684-
psql_error("%s",PQerrorMessage(pset.db));
684+
constchar*error=PQerrorMessage(pset.db);
685+
if (strlen(error))
686+
psql_error("%s",error);
687+
685688
ReportSyntaxErrorPosition(result,query);
686689
CheckConnection();
687690
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp