There is a thing that might lead to confusion in the previous post:
> create or replace function yearmod(int) RETURNS int
> as 'select (($1 >> 2) %32);'
> language sql
> immutable
> strict;
is equivalent with
create or replace function yearmod(int) RETURNS int
as 'select (($1 / 4) %32);'
language sql
immutable
strict;
and that is the function that was used with all the other output (it can
be seen inlined in the explain output). I did not catch this until after
the post.
regards,
Yeb Havinga