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

Commit351372e

Browse files
committed
Department of second thoughts: probably still need an IsTransactionState
test in there...
1 parent5f15fa8 commit351372e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎src/backend/utils/mb/mbutils.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* (currently mule internal code (mic) is used)
55
* Tatsuo Ishii
66
*
7-
* $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.40 2003/04/2717:31:25 tgl Exp $
7+
* $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.41 2003/04/2718:01:46 tgl Exp $
88
*/
99
#include"postgres.h"
1010

@@ -106,6 +106,17 @@ SetClientEncoding(int encoding, bool doit)
106106
return0;
107107
}
108108

109+
/*
110+
* If we're not inside a transaction then we can't do catalog lookups,
111+
* so fail. After backend startup, this could only happen if we
112+
* are re-reading postgresql.conf due to SIGHUP --- so basically this
113+
* just constrains the ability to change client_encoding on the fly
114+
* from postgresql.conf. Which would probably be a stupid thing to do
115+
* anyway.
116+
*/
117+
if (!IsTransactionState())
118+
return-1;
119+
109120
/*
110121
* Look up the conversion functions.
111122
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp