forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitba8f00e
committed
Improve PL/Tcl's method for choosing Tcl names of procedures.
Previously, the internal name of a PL/Tcl function was just"__PLTcl_proc_NNNN", where NNNN is the function OID. That's prettyunhelpful when reading an error report. Plus it prevents us fromtesting the CONTEXT output for PL/Tcl errors, since the OIDs shownin the regression tests wouldn't be stable.Instead, base the internal name on the result of format_procedure(),which will be unique in most cases. For the edge cases where it'snot, we can append the function OID to make it unique.Sadly, the pltcl_trigger.sql test script still has to suppress thecontext reports, because they'd include trigger arguments whichcontain relation OIDs per PL/Tcl's longstanding API for triggers.I had to modify one existing test case to throw a different errorthan before, because I found that Tcl 8.5 and Tcl 8.6 spell thecontext message for the original error slightly differently.We might have to make more adjustments in that vein once thisgets wider testing.Patch by me; thanks to Pavel Stehule for the idea to useformat_procedure() rather than just the proname.Discussion:https://postgr.es/m/890581.1717609350@sss.pgh.pa.us1 parentaaab3ee commitba8f00e
File tree
8 files changed
+520
-46
lines changed- doc/src/sgml
- src/pl/tcl
- expected
- sql
8 files changed
+520
-46
lines changedLines changed: 13 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | 1122 |
| |
1123 |
| - | |
| 1123 | + | |
| 1124 | + | |
1124 | 1125 |
| |
1125 |
| - | |
1126 |
| - | |
1127 |
| - | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1128 | 1131 |
| |
1129 | 1132 |
| |
1130 | 1133 |
| |
1131 | 1134 |
| |
1132 | 1135 |
| |
1133 | 1136 |
| |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1134 | 1143 |
| |
1135 | 1144 |
|
0 commit comments
Comments
(0)