diff options
| author | Tom Lane | 2009-04-02 17:30:53 +0000 |
|---|---|---|
| committer | Tom Lane | 2009-04-02 17:30:53 +0000 |
| commit | c26ffb1ead84adc79ef6cfbe125b300cccd1e2b7 (patch) | |
| tree | eb6c008580e6f5785ff850487f845bc1bc2fd87b /src/include | |
| parent | 33e7eac37cf92d46b0f0523faca79075be0972f0 (diff) | |
Fix SetClientEncoding() to maintain a cache of previously selected encoding
conversion functions. This allows transaction rollback to revert to a
previous client_encoding setting without doing fresh catalog lookups.
I believe that this explains and fixes the recent report of "failed to commit
client_encoding" failures.
This bug is present in 8.3.x, but it doesn't seem prudent to back-patch
the fix, at least not till it's had some time for field testing in HEAD.
In passing, remove SetDefaultClientEncoding(), which was used nowhere.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/mb/pg_wchar.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h index 3f93d7bc128..5b780db2a2d 100644 --- a/src/include/mb/pg_wchar.h +++ b/src/include/mb/pg_wchar.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.87 2009/03/09 00:01:32 alvherre Exp $ + * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.88 2009/04/02 17:30:53 tgl Exp $ * * NOTES * This is used both by the backend and by libpq, but should not be @@ -383,7 +383,6 @@ extern size_t wchar2char(char *to, const wchar_t *from, size_t tolen); extern size_t char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen); #endif -extern void SetDefaultClientEncoding(void); extern int SetClientEncoding(int encoding, bool doit); extern void InitializeClientEncoding(void); extern int pg_get_client_encoding(void); |
