Thread: Trivial heap_finish_speculative() error message inaccuracy
While auditing the access method code associated with ON CONFLICT DO UPDATE's speculative insertion infrastructure, I noticed an inaccuracy. Attached patch fixes the trivial inaccuracy in a defensive elog() call. Quite simply, this call site didn't get the memo when we renamed that function during the late stages of development. -- Peter Geoghegan
Attachment
Peter Geoghegan <pg@heroku.com> writes: > While auditing the access method code associated with ON CONFLICT DO > UPDATE's speculative insertion infrastructure, I noticed an > inaccuracy. > Attached patch fixes the trivial inaccuracy in a defensive elog() > call. Quite simply, this call site didn't get the memo when we renamed > that function during the late stages of development. This seems like a fine teaching moment in which to point out our longstanding error message style guideline that says not to put names of C functions into error messages in the first place. regards, tom lane
On Tue, Nov 3, 2015 at 7:10 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > This seems like a fine teaching moment in which to point out our > longstanding error message style guideline that says not to put > names of C functions into error messages in the first place. I don't ordinarily do that, of course, but I thought it was important to be consistent with other such elog() calls within heapam.c. I think that there at least 10 that look like this. -- Peter Geoghegan
On 2015-11-03 19:14:44 -0800, Peter Geoghegan wrote: > On Tue, Nov 3, 2015 at 7:10 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > This seems like a fine teaching moment in which to point out our > > longstanding error message style guideline that says not to put > > names of C functions into error messages in the first place. > > I don't ordinarily do that, of course, but I thought it was important > to be consistent with other such elog() calls within heapam.c. Internal, super unlikely, elog()s don't seem to need much consistency among themselves. > I think that there at least 10 that look like this. Let's rather rip those function names out. Unless somebody protests I'm going to do so in 9.5/master. Andres
On 2015-11-18 23:50:30 +0100, Andres Freund wrote: > Let's rather rip those function names out. Unless somebody protests I'm > going to do so in 9.5/master. Done.