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

Commit213d7b1

Browse files
committed
From: Bryan Henderson <bryanh@giraffe.netgate.net>
The attached patch makes elog() write the message to stderr if there isno frontend to talk to.
1 parent8d0fe2d commit213d7b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.19 1997/09/08 02:31:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.20 1997/11/09 04:43:35 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -162,6 +162,12 @@ elog(int lev, const char *fmt,...)
162162
pq_putstr(line);
163163
pq_flush();
164164
}
165+
if (Pfout==NULL) {
166+
/* There is no socket. One explanation for this is we are running
167+
as the Postmaster. So we'll write the message to stderr.
168+
*/
169+
fputs(line,stderr);
170+
}
165171
#endif/* !PG_STANDALONE */
166172

167173
if (lev==WARN)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp