- Notifications
You must be signed in to change notification settings - Fork5
Commit991f3e5
committed
Provide database object names as separate fields in error messages.
This patch addresses the problem that applications currently have toextract object names from possibly-localized textual error messages,if they want to know for example which index caused a UNIQUE_VIOLATIONfailure. It adds new error message fields to the wire protocol, whichcan carry the name of a table, table column, data type, or constraintassociated with the error. (Since the protocol spec has always instructedclients to ignore unrecognized field types, this should not create anycompatibility problem.)Support for providing these new fields has been added to just a limited setof error reports (mainly, those in the "integrity constraint violation"SQLSTATE class), but we will doubtless add them to more calls in future.Pavel Stehule, reviewed and extensively revised by Peter Geoghegan, withadditional hacking by Tom Lane.1 parent89d00cb commit991f3e5
File tree
27 files changed
+604
-41
lines changed- doc/src/sgml
- src
- backend
- access
- hash
- nbtree
- commands
- executor
- utils
- adt
- cache
- error
- sort
- include
- access
- utils
- interfaces/libpq
27 files changed
+604
-41
lines changedLines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 |
| |
53 | 65 |
| |
54 | 66 |
| |
|
Lines changed: 64 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2679 | 2679 |
| |
2680 | 2680 |
| |
2681 | 2681 |
| |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
2682 | 2738 |
| |
2683 | 2739 |
| |
2684 | 2740 |
| |
| |||
2710 | 2766 |
| |
2711 | 2767 |
| |
2712 | 2768 |
| |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
2713 | 2777 |
| |
2714 | 2778 |
| |
2715 | 2779 |
| |
|
Lines changed: 74 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4757 | 4757 |
| |
4758 | 4758 |
| |
4759 | 4759 |
| |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
| 4819 | + | |
| 4820 | + | |
| 4821 | + | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
4760 | 4826 |
| |
4761 | 4827 |
| |
4762 | 4828 |
| |
| |||
4794 | 4860 |
| |
4795 | 4861 |
| |
4796 | 4862 |
| |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
4797 | 4871 |
| |
4798 | 4872 |
| |
4799 | 4873 |
| |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
276 | 315 |
| |
277 | 316 |
| |
278 | 317 |
| |
| |||
301 | 340 |
| |
302 | 341 |
| |
303 | 342 |
| |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
304 | 360 |
| |
305 | 361 |
| |
306 | 362 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
89 |
| - | |
| 89 | + | |
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
| 70 | + | |
| 71 | + | |
71 | 72 |
| |
72 | 73 |
| |
73 | 74 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
393 | 393 |
| |
394 | 394 |
| |
395 | 395 |
| |
396 |
| - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
397 | 399 |
| |
398 | 400 |
| |
399 | 401 |
| |
| |||
455 | 457 |
| |
456 | 458 |
| |
457 | 459 |
| |
458 |
| - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
459 | 463 |
| |
460 | 464 |
| |
461 | 465 |
| |
| |||
523 | 527 |
| |
524 | 528 |
| |
525 | 529 |
| |
| 530 | + | |
| 531 | + | |
526 | 532 |
| |
527 | 533 |
| |
528 | 534 |
| |
| |||
533 | 539 |
| |
534 | 540 |
| |
535 | 541 |
| |
536 |
| - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
537 | 545 |
| |
538 | 546 |
| |
539 | 547 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 |
| - | |
| 112 | + | |
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
| 119 | + | |
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
|
0 commit comments
Comments
(0)