- Notifications
You must be signed in to change notification settings - Fork5
Commit0378a26

Barry Lind
This set of changes applies a patch from KHO at redhat to add some SQLState
support to the jdbc driver.That patch needed some work: it assumed the sqlcode in a server message wasfixed in its position, the patch lost the ability to pass exceptions, and thepatch missed a couple of places where server errors where being received.In addition to fixing the above, I also added full support for the V3 protocolerror message syntax, I reversed the order of arguments in the PSQLExceptionconstructor to more closely follow the constructors for SQLException, I changedthe new constructors that take PSQLState to take Object for additionalparameters as the old ones did.Still todo are to add SQLState values to all existing exceptions thrown in thedriver and add support for parsing the V3 protocol format for notices. Modified Files: jdbc/build.xml jdbc/org/postgresql/Driver.java.in jdbc/org/postgresql/errors.properties jdbc/org/postgresql/core/Encoding.java jdbc/org/postgresql/core/PGStream.java jdbc/org/postgresql/core/QueryExecutor.java jdbc/org/postgresql/fastpath/Fastpath.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/util/MessageTranslator.java jdbc/org/postgresql/util/PSQLException.java1 parente702b04 commit0378a26
File tree
13 files changed
+299
-166
lines changed- src/interfaces/jdbc/org/postgresql
- core
- fastpath
- jdbc1
- jdbc2
- util
13 files changed
+299
-166
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
419 | 420 |
| |
420 | 421 |
| |
421 | 422 |
| |
422 |
| - | |
| 423 | + | |
423 | 424 |
| |
424 | 425 |
| |
425 | 426 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| |||
160 | 161 |
| |
161 | 162 |
| |
162 | 163 |
| |
163 |
| - | |
| 164 | + | |
164 | 165 |
| |
165 | 166 |
| |
166 | 167 |
| |
| |||
185 | 186 |
| |
186 | 187 |
| |
187 | 188 |
| |
188 |
| - | |
| 189 | + | |
189 | 190 |
| |
190 | 191 |
| |
191 | 192 |
| |
| |||
215 | 216 |
| |
216 | 217 |
| |
217 | 218 |
| |
218 |
| - | |
| 219 | + | |
219 | 220 |
| |
220 | 221 |
| |
221 | 222 |
| |
|
Lines changed: 13 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
164 | 165 |
| |
165 | 166 |
| |
166 | 167 |
| |
167 |
| - | |
| 168 | + | |
168 | 169 |
| |
169 | 170 |
| |
170 | 171 |
| |
171 |
| - | |
| 172 | + | |
172 | 173 |
| |
173 | 174 |
| |
174 | 175 |
| |
| |||
191 | 192 |
| |
192 | 193 |
| |
193 | 194 |
| |
194 |
| - | |
| 195 | + | |
195 | 196 |
| |
196 | 197 |
| |
197 | 198 |
| |
198 | 199 |
| |
199 | 200 |
| |
200 |
| - | |
| 201 | + | |
201 | 202 |
| |
202 | 203 |
| |
203 | 204 |
| |
| |||
220 | 221 |
| |
221 | 222 |
| |
222 | 223 |
| |
223 |
| - | |
| 224 | + | |
224 | 225 |
| |
225 | 226 |
| |
226 | 227 |
| |
227 | 228 |
| |
228 | 229 |
| |
229 |
| - | |
| 230 | + | |
230 | 231 |
| |
231 | 232 |
| |
232 | 233 |
| |
| |||
254 | 255 |
| |
255 | 256 |
| |
256 | 257 |
| |
257 |
| - | |
| 258 | + | |
258 | 259 |
| |
259 | 260 |
| |
260 | 261 |
| |
| |||
277 | 278 |
| |
278 | 279 |
| |
279 | 280 |
| |
280 |
| - | |
| 281 | + | |
281 | 282 |
| |
282 | 283 |
| |
283 | 284 |
| |
| |||
389 | 390 |
| |
390 | 391 |
| |
391 | 392 |
| |
392 |
| - | |
| 393 | + | |
393 | 394 |
| |
394 | 395 |
| |
395 | 396 |
| |
396 | 397 |
| |
397 | 398 |
| |
398 |
| - | |
| 399 | + | |
399 | 400 |
| |
400 | 401 |
| |
401 | 402 |
| |
| |||
412 | 413 |
| |
413 | 414 |
| |
414 | 415 |
| |
415 |
| - | |
| 416 | + | |
416 | 417 |
| |
417 | 418 |
| |
418 | 419 |
| |
|
Lines changed: 27 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
108 | 109 |
| |
109 | 110 |
| |
110 | 111 |
| |
111 |
| - | |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
115 |
| - | |
| 116 | + | |
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
| |||
148 | 149 |
| |
149 | 150 |
| |
150 | 151 |
| |
151 |
| - | |
152 |
| - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
153 | 161 |
| |
154 |
| - | |
155 |
| - | |
156 | 162 |
| |
157 | 163 |
| |
158 | 164 |
| |
| |||
178 | 184 |
| |
179 | 185 |
| |
180 | 186 |
| |
181 |
| - | |
| 187 | + | |
182 | 188 |
| |
183 | 189 |
| |
184 | 190 |
| |
185 | 191 |
| |
186 | 192 |
| |
187 |
| - | |
188 |
| - | |
| 193 | + | |
189 | 194 |
| |
190 | 195 |
| |
191 | 196 |
| |
192 | 197 |
| |
193 | 198 |
| |
194 |
| - | |
195 |
| - | |
196 |
| - | |
| 199 | + | |
| 200 | + | |
197 | 201 |
| |
198 | 202 |
| |
199 | 203 |
| |
| |||
216 | 220 |
| |
217 | 221 |
| |
218 | 222 |
| |
219 |
| - | |
| 223 | + | |
220 | 224 |
| |
221 | 225 |
| |
222 | 226 |
| |
| |||
275 | 279 |
| |
276 | 280 |
| |
277 | 281 |
| |
278 |
| - | |
279 |
| - | |
| 282 | + | |
280 | 283 |
| |
281 | 284 |
| |
282 | 285 |
| |
| |||
308 | 311 |
| |
309 | 312 |
| |
310 | 313 |
| |
311 |
| - | |
| 314 | + | |
312 | 315 |
| |
313 | 316 |
| |
314 | 317 |
| |
| |||
349 | 352 |
| |
350 | 353 |
| |
351 | 354 |
| |
352 |
| - | |
| 355 | + | |
353 | 356 |
| |
354 | 357 |
| |
355 | 358 |
| |
| |||
379 | 382 |
| |
380 | 383 |
| |
381 | 384 |
| |
382 |
| - | |
| 385 | + | |
383 | 386 |
| |
384 | 387 |
| |
385 | 388 |
| |
| |||
395 | 398 |
| |
396 | 399 |
| |
397 | 400 |
| |
398 |
| - | |
| 401 | + | |
399 | 402 |
| |
400 | 403 |
| |
401 | 404 |
| |
| |||
429 | 432 |
| |
430 | 433 |
| |
431 | 434 |
| |
432 |
| - | |
| 435 | + | |
433 | 436 |
| |
434 | 437 |
| |
435 | 438 |
| |
| |||
455 | 458 |
| |
456 | 459 |
| |
457 | 460 |
| |
458 |
| - | |
| 461 | + | |
459 | 462 |
| |
460 | 463 |
| |
461 | 464 |
| |
| |||
467 | 470 |
| |
468 | 471 |
| |
469 | 472 |
| |
470 |
| - | |
| 473 | + | |
471 | 474 |
| |
472 | 475 |
| |
473 | 476 |
| |
| |||
491 | 494 |
| |
492 | 495 |
| |
493 | 496 |
| |
494 |
| - | |
| 497 | + | |
495 | 498 |
| |
496 | 499 |
| |
497 | 500 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
| |||
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 |
| |
33 | 40 |
| |
34 | 41 |
| |
|
0 commit comments
Comments
(0)