aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-27 17:31:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-27 17:31:25 +0000
commit5f15fa8d0693a333f37eb2b44c10d2f784202615 (patch)
tree09faf73c008ee1df57674affcfac16b8ef283a72 /src/backend/commands/variable.c
parent20aae3047fb6a04c7cd042873aefa5cba404cfa9 (diff)
downloadpostgresql-5f15fa8d0693a333f37eb2b44c10d2f784202615.tar.gz
postgresql-5f15fa8d0693a333f37eb2b44c10d2f784202615.zip
Clean up some problems in SetClientEncoding: failed to honor doit flag
in all cases, leaked TopMemoryContext memory in others. Make the interaction between SetClientEncoding and InitializeClientEncoding cleaner and better documented. I suspect these changes should be back-patched into 7.3, but will wait on Tatsuo's verification.
Diffstat (limited to 'src/backend/commands/variable.c')
-rw-r--r--src/backend/commands/variable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 7b23cc80d00..25291d34cb8 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.74 2003/04/25 19:45:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.75 2003/04/27 17:31:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -484,10 +484,10 @@ assign_client_encoding(const char *value, bool doit, bool interactive)
return NULL;
/*
- * XXX SetClientEncoding depends on namespace functions which are not
- * available at startup time. So we accept requested client encoding
- * anyway which might not be valid (e.g. no conversion procs
- * available).
+ * Note: if we are in startup phase then SetClientEncoding may not be
+ * able to really set the encoding. In this case we will assume that
+ * the encoding is okay, and InitializeClientEncoding() will fix things
+ * once initialization is complete.
*/
if (SetClientEncoding(encoding, doit) < 0)
{