forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit83b6131
committed
Improve behavior of tsearch_readline(), and remove t_readline().
Commitfbeb9da, which added the tsearch_readline APIs, leftt_readline() in place as a compatibility measure. But that functionhas been unused and deprecated for twelve years now, so that seemslike enough time to remove it. Doing so, and merging t_readline'scode into tsearch_readline, aids in making several usefulimprovements:* The hard-wired 4K limit on line length in tsearch data files isremoved, by using a StringInfo buffer instead of a fixed-size buffer.* We can buy back the per-line palloc/pfree added by3ea7e95in the common case where encoding conversion is not required.* We no longer need a separate pg_verify_mbstr call, as thatfunctionality was folded into encoding conversion some time ago.(We could have done some of this stuff while keeping t_readline as aseparate API, but there seems little point, since there's no reasonfor anyone to still be using t_readline directly.)Discussion:https://postgr.es/m/48A4FA71-524E-41B9-953A-FD04EF36E2E7@yesql.se1 parentaca7484 commit83b6131
File tree
3 files changed
+32
-58
lines changed- src
- backend/tsearch
- include/tsearch
3 files changed
+32
-58
lines changedLines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 | 289 |
| |
295 | 290 |
| |
296 | 291 |
| |
|
Lines changed: 28 additions & 50 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
128 | 129 |
| |
129 | 130 |
| |
130 | 131 |
| |
| 132 | + | |
131 | 133 |
| |
132 | 134 |
| |
133 | 135 |
| |
| |||
145 | 147 |
| |
146 | 148 |
| |
147 | 149 |
| |
148 |
| - | |
| 150 | + | |
149 | 151 |
| |
150 | 152 |
| |
151 | 153 |
| |
152 | 154 |
| |
153 | 155 |
| |
154 | 156 |
| |
155 | 157 |
| |
156 |
| - | |
| 158 | + | |
| 159 | + | |
157 | 160 |
| |
158 | 161 |
| |
159 | 162 |
| |
160 | 163 |
| |
161 |
| - | |
162 |
| - | |
| 164 | + | |
163 | 165 |
| |
164 | 166 |
| |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
165 | 173 |
| |
166 |
| - | |
167 |
| - | |
168 |
| - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
169 | 185 |
| |
170 |
| - | |
171 |
| - | |
172 |
| - | |
| 186 | + | |
173 | 187 |
| |
174 | 188 |
| |
175 | 189 |
| |
| |||
181 | 195 |
| |
182 | 196 |
| |
183 | 197 |
| |
184 |
| - | |
| 198 | + | |
| 199 | + | |
185 | 200 |
| |
186 | 201 |
| |
187 | 202 |
| |
188 | 203 |
| |
| 204 | + | |
189 | 205 |
| |
190 | 206 |
| |
191 | 207 |
| |
| |||
203 | 219 |
| |
204 | 220 |
| |
205 | 221 |
| |
206 |
| - | |
207 |
| - | |
| 222 | + | |
208 | 223 |
| |
209 | 224 |
| |
210 | 225 |
| |
| |||
220 | 235 |
| |
221 | 236 |
| |
222 | 237 |
| |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 | 238 |
| |
261 | 239 |
| |
262 | 240 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 |
| |
38 | 41 |
| |
39 | 42 |
| |
| |||
57 | 60 |
| |
58 | 61 |
| |
59 | 62 |
| |
60 |
| - | |
61 |
| - | |
62 | 63 |
|
0 commit comments
Comments
(0)