- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitde9037d
committed
Downgrade errors in object_ownercheck() to internal
The "does not exist" errors in object_ownership() were written asereport(), suggesting that they are user-facing. But no code pathexcept one can reach this function without first checking that theobject exists. If this were actually a user-facing error message,then there would be some problems: get_object_class_descr() is meantto be for internal errors only and does not support translation.The one case that can reach this without first checking the objectexistence is from be_lo_unlink(). (This makes some sense since largeobjects are referred to by their OID directly.) In this one case, wecan add a line of code to check the object existence explicitly,consistent with other LO code.For the rest, downgrade the error messages to elog()s. The newmessage wordings are the same as in DropObjectById().Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://www.postgresql.org/message-id/flat/da2f8942-be6d-48d0-ac1c-a053370a6b1f@eisentraut.org1 parent6fdd5d9 commitde9037d
2 files changed
+9
-6
lines changedLines changed: 4 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4082 | 4082 |
| |
4083 | 4083 |
| |
4084 | 4084 |
| |
4085 |
| - | |
4086 |
| - | |
4087 |
| - | |
| 4085 | + | |
| 4086 | + | |
4088 | 4087 |
| |
4089 | 4088 |
| |
4090 | 4089 |
| |
| |||
4113 | 4112 |
| |
4114 | 4113 |
| |
4115 | 4114 |
| |
4116 |
| - | |
4117 |
| - | |
4118 |
| - | |
| 4115 | + | |
| 4116 | + | |
4119 | 4117 |
| |
4120 | 4118 |
| |
4121 | 4119 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
317 | 317 |
| |
318 | 318 |
| |
319 | 319 |
| |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
320 | 325 |
| |
321 | 326 |
| |
322 | 327 |
| |
|
0 commit comments
Comments
(0)