]> granicus.if.org Git - postgresql/commit
Avoid extra AggCheckCallContext() checks in ordered-set aggregates.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Jan 2014 19:33:52 +0000 (14:33 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Jan 2014 19:33:52 +0000 (14:33 -0500)
commit847e46abc92333a5a948d8fa886604832c1db238
tree3dca81d89dc74fb412e5e01f05d1cff8a268d534
parente6336b8b5772b9856d65ef967e0b9f748f0f7b0b
Avoid extra AggCheckCallContext() checks in ordered-set aggregates.

In the transition functions, we don't really need to recheck this after the
first call.  I had been feeling paranoid about possibly getting a non-null
argument value in some other context; but it's probably game over anyway
if we have a non-null "internal" value that's not what we are expecting.

In the final functions, the general convention in pre-existing final
functions seems to be that an Assert() is good enough, so do it like that
here too.

This seems to save a few tenths of a percent of overall query runtime,
which isn't much, but still it's just overhead if there's not a plausible
case where the checks would fire.
src/backend/utils/adt/orderedsetaggs.c