forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit17a28b0
committed
Improve the internal implementation of ereport().
Change all the auxiliary error-reporting routines to return void,now that we no longer need to pretend they are passing somethinguseful to errfinish(). While this probably doesn't save anythingsignificant at the machine-code level, it allows detection of someadditional types of mistakes.Pass the error location details (__FILE__, __LINE__, PG_FUNCNAME_MACRO)to errfinish not errstart. This shaves a few cycles off the case whereerrstart decides we're not going to emit anything.Re-implement elog() as a trivial wrapper around ereport(), removingthe separate support infrastructure it used to have. Aside fromgetting rid of some now-surplus code, this means that elog() nowreally does have exactly the same semantics as ereport(), in particularthat it can skip evaluation work if the message is not to be emitted.Andres Freund and Tom LaneDiscussion:https://postgr.es/m/CA+fd4k6N8EjNvZpM8nme+y+05mz-SM8Z_BgkixzkA34R+ej0Kw@mail.gmail.com1 parente3a87b4 commit17a28b0
File tree
14 files changed
+108
-274
lines changed- src
- backend
- executor
- parser
- storage/ipc
- utils
- adt
- error
- include
- executor
- parser
- utils
- pl/plpgsql/src
14 files changed
+108
-274
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
832 | 832 |
| |
833 | 833 |
| |
834 | 834 |
| |
835 |
| - | |
| 835 | + | |
836 | 836 |
| |
837 | 837 |
| |
838 | 838 |
| |
839 | 839 |
| |
840 | 840 |
| |
841 | 841 |
| |
842 |
| - | |
| 842 | + | |
843 | 843 |
| |
844 | 844 |
| |
845 |
| - | |
| 845 | + | |
846 | 846 |
| |
847 | 847 |
| |
848 | 848 |
| |
849 |
| - | |
| 849 | + | |
850 | 850 |
| |
851 | 851 |
| |
852 | 852 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1246 | 1246 |
| |
1247 | 1247 |
| |
1248 | 1248 |
| |
1249 |
| - | |
| 1249 | + | |
1250 | 1250 |
| |
1251 | 1251 |
| |
1252 | 1252 |
| |
1253 | 1253 |
| |
1254 | 1254 |
| |
1255 |
| - | |
| 1255 | + | |
1256 | 1256 |
| |
1257 |
| - | |
| 1257 | + | |
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 | 1260 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
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 |
| |
123 |
| - | |
| 123 | + | |
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1076 | 1076 |
| |
1077 | 1077 |
| |
1078 | 1078 |
| |
1079 |
| - | |
| 1079 | + | |
1080 | 1080 |
| |
1081 | 1081 |
| |
1082 | 1082 |
| |
1083 | 1083 |
| |
1084 | 1084 |
| |
1085 |
| - | |
| 1085 | + | |
1086 | 1086 |
| |
1087 | 1087 |
| |
1088 | 1088 |
| |
1089 | 1089 |
| |
1090 |
| - | |
| 1090 | + | |
1091 | 1091 |
| |
1092 | 1092 |
| |
1093 | 1093 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
| 95 | + | |
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
| |||
1030 | 1030 |
| |
1031 | 1031 |
| |
1032 | 1032 |
| |
1033 |
| - | |
| 1033 | + | |
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 |
| - | |
| 1037 | + | |
1038 | 1038 |
| |
1039 |
| - | |
| 1039 | + | |
1040 | 1040 |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
332 |
| - | |
| 332 | + | |
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
| |||
631 | 631 |
| |
632 | 632 |
| |
633 | 633 |
| |
634 |
| - | |
| 634 | + | |
635 | 635 |
| |
636 | 636 |
| |
637 | 637 |
| |
| |||
689 | 689 |
| |
690 | 690 |
| |
691 | 691 |
| |
692 |
| - | |
693 |
| - | |
| 692 | + | |
| 693 | + | |
694 | 694 |
| |
695 | 695 |
| |
696 | 696 |
| |
|
0 commit comments
Comments
(0)