Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy
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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy
On 2015-11-03 19:14:44 -0800, Peter Geoghegan wrote: > On Tue, Nov 3, 2015 at 7:10 PM, Tom Lanewrote: > > 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy
Peter Geogheganwrites: > 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] 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 diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 35a2b05..72611fb 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -5809,7 +5809,7 @@ heap_finish_speculative(Relation relation, HeapTuple tuple) lp = PageGetItemId(page, offnum); if (PageGetMaxOffsetNumber(page) < offnum || !ItemIdIsNormal(lp)) - elog(ERROR, "heap_confirm_insert: invalid lp"); + elog(ERROR, "heap_finish_speculative: invalid lp"); htup = (HeapTupleHeader) PageGetItem(page, lp); -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Trivial heap_finish_speculative() error message inaccuracy
On Tue, Nov 3, 2015 at 7:10 PM, Tom Lanewrote: > 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers