13246: pgsql / calendar - fix broken sql in grants check