forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd838e2
committed
Neaten up our choices of SQLSTATEs for XML-related errors.
When our XML-handling modules were first written, the SQL standardlacked any error codes that were particularly intended for XMLerror conditions. Unsurprisingly, this led to some rather randomchoices of errcodes in those modules. Now the standard has a wholeSQLSTATE class, "Class 10 - XQuery Error", with a reasonably largeselection of relevant-looking errcodes.In this patch I've chosen one fairly generic code defined by thestandard, 10608 = invalid_argument_for_xquery, and used it whereit seemed appropriate. I've also made an effort to replaceERRCODE_INTERNAL_ERROR everywhere it was not clearly reportinga coding problem; in particular, many of the existing uses looklike they can fairly be reported as ERRCODE_OUT_OF_MEMORY.It might be interesting to try to map libxml2's error codes intothe standard's new collection, but I've not undertaken that here.Discussion:https://postgr.es/m/417250.1726341268@sss.pgh.pa.us1 parent3da436e commitcd838e2
File tree
4 files changed
+27
-21
lines changed- contrib/xml2
- src/backend/utils
- adt
4 files changed
+27
-21
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
391 |
| - | |
| 391 | + | |
392 | 392 |
| |
393 | 393 |
| |
394 | 394 |
| |
| |||
652 | 652 |
| |
653 | 653 |
| |
654 | 654 |
| |
655 |
| - | |
| 655 | + | |
656 | 656 |
| |
657 | 657 |
| |
658 | 658 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
| 93 | + | |
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
| |||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
102 |
| - | |
| 102 | + | |
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
| 109 | + | |
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
| 144 | + | |
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
|
Lines changed: 15 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
344 | 344 |
| |
345 | 345 |
| |
346 | 346 |
| |
347 |
| - | |
| 347 | + | |
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
| |||
742 | 742 |
| |
743 | 743 |
| |
744 | 744 |
| |
745 |
| - | |
| 745 | + | |
746 | 746 |
| |
747 | 747 |
| |
748 | 748 |
| |
| |||
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
788 |
| - | |
| 788 | + | |
789 | 789 |
| |
790 | 790 |
| |
791 | 791 |
| |
792 | 792 |
| |
793 | 793 |
| |
794 | 794 |
| |
795 | 795 |
| |
796 |
| - | |
| 796 | + | |
797 | 797 |
| |
798 | 798 |
| |
799 | 799 |
| |
| |||
1004 | 1004 |
| |
1005 | 1005 |
| |
1006 | 1006 |
| |
1007 |
| - | |
| 1007 | + | |
1008 | 1008 |
| |
1009 | 1009 |
| |
1010 | 1010 |
| |
| |||
4383 | 4383 |
| |
4384 | 4384 |
| |
4385 | 4385 |
| |
4386 |
| - | |
| 4386 | + | |
4387 | 4387 |
| |
4388 | 4388 |
| |
4389 | 4389 |
| |
| |||
4456 | 4456 |
| |
4457 | 4457 |
| |
4458 | 4458 |
| |
4459 |
| - | |
| 4459 | + | |
4460 | 4460 |
| |
4461 | 4461 |
| |
4462 | 4462 |
| |
| |||
4468 | 4468 |
| |
4469 | 4469 |
| |
4470 | 4470 |
| |
4471 |
| - | |
| 4471 | + | |
4472 | 4472 |
| |
4473 | 4473 |
| |
4474 | 4474 |
| |
| |||
4798 | 4798 |
| |
4799 | 4799 |
| |
4800 | 4800 |
| |
4801 |
| - | |
| 4801 | + | |
4802 | 4802 |
| |
4803 | 4803 |
| |
4804 | 4804 |
| |
| |||
4820 | 4820 |
| |
4821 | 4821 |
| |
4822 | 4822 |
| |
4823 |
| - | |
| 4823 | + | |
4824 | 4824 |
| |
4825 | 4825 |
| |
4826 | 4826 |
| |
| |||
4830 | 4830 |
| |
4831 | 4831 |
| |
4832 | 4832 |
| |
4833 |
| - | |
| 4833 | + | |
4834 | 4834 |
| |
4835 | 4835 |
| |
4836 | 4836 |
| |
| |||
4854 | 4854 |
| |
4855 | 4855 |
| |
4856 | 4856 |
| |
4857 |
| - | |
| 4857 | + | |
4858 | 4858 |
| |
4859 | 4859 |
| |
4860 | 4860 |
| |
| |||
4864 | 4864 |
| |
4865 | 4865 |
| |
4866 | 4866 |
| |
4867 |
| - | |
| 4867 | + | |
4868 | 4868 |
| |
4869 | 4869 |
| |
4870 | 4870 |
| |
| |||
4891 | 4891 |
| |
4892 | 4892 |
| |
4893 | 4893 |
| |
4894 |
| - | |
| 4894 | + | |
4895 | 4895 |
| |
4896 | 4896 |
| |
4897 | 4897 |
| |
| |||
4955 | 4955 |
| |
4956 | 4956 |
| |
4957 | 4957 |
| |
4958 |
| - | |
| 4958 | + | |
4959 | 4959 |
| |
4960 | 4960 |
| |
4961 | 4961 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
144 | 150 |
| |
145 | 151 |
| |
146 | 152 |
| |
|
0 commit comments
Comments
(0)