File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 4
4
* (currently mule internal code (mic) is used)
5
5
* Tatsuo Ishii
6
6
*
7
- * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.40 2003/04/27 17:31:25 tgl Exp $
7
+ * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.41 2003/04/27 18:01:46 tgl Exp $
8
8
*/
9
9
#include "postgres.h"
10
10
@@ -106,6 +106,17 @@ SetClientEncoding(int encoding, bool doit)
106
106
return 0 ;
107
107
}
108
108
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
+
109
120
/*
110
121
* Look up the conversion functions.
111
122
*/
You can’t perform that action at this time.
0 commit comments