forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitea1b99a
committed
Add 'noError' argument to encoding conversion functions.
With the 'noError' argument, you can try to convert a buffer withoutknowing the character boundaries beforehand. The functions now need toreturn the number of input bytes successfully converted.This is is a backwards-incompatible change, if you have created a customencoding conversion with CREATE CONVERSION. This adds a check topg_upgrade for that, refusing the upgrade if there are any user-definedencoding conversions. Custom conversions are very rare, there are nocommonly used extensions that I know of that uses that feature. No otherobjects can depend on conversions, so if you do have one, you can fairlyeasily drop it before upgrading, and recreate it after the upgrade withan updated version.Add regression tests for built-in encoding conversions. This doesn't coverevery conversion, but it covers all the internal functions in conv.c thatare used to implement the conversions.Reviewed-by: John NaylorDiscussion:https://www.postgresql.org/message-id/e7861509-3960-538a-9025-b75a61188e01%40iki.fi1 parente2639a7 commitea1b99a
File tree
40 files changed
+2333
-631
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- utils
- error
- mb
- conversion_procs
- cyrillic_and_mic
- euc2004_sjis2004
- euc_cn_and_mic
- euc_jp_and_sjis
- euc_kr_and_mic
- euc_tw_and_big5
- latin2_and_win1250
- latin_and_mic
- utf8_and_big5
- utf8_and_cyrillic
- utf8_and_euc2004
- utf8_and_euc_cn
- utf8_and_euc_jp
- utf8_and_euc_kr
- utf8_and_euc_tw
- utf8_and_gb18030
- utf8_and_gbk
- utf8_and_iso8859
- utf8_and_iso8859_1
- utf8_and_johab
- utf8_and_sjis
- utf8_and_sjis2004
- utf8_and_uhc
- utf8_and_win
- bin/pg_upgrade
- include
- catalog
- mb
- test/regress
- expected
- input
- output
- sql
40 files changed
+2333
-631
lines changedLines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
121 |
| - | |
122 |
| - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
123 | 129 |
| |
124 | 130 |
| |
125 | 131 |
| |
|
Lines changed: 22 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
| 50 | + | |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
| |
| |||
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
95 |
| - | |
96 |
| - | |
| 96 | + | |
| 97 | + | |
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
100 |
| - | |
| 101 | + | |
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
| |||
111 | 112 |
| |
112 | 113 |
| |
113 | 114 |
| |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
120 | 132 |
| |
121 | 133 |
| |
122 | 134 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2271 | 2271 |
| |
2272 | 2272 |
| |
2273 | 2273 |
| |
| 2274 | + | |
| 2275 | + | |
2274 | 2276 |
| |
2275 | 2277 |
| |
2276 | 2278 |
| |
|
0 commit comments
Comments
(0)