generates some type annotations, e.g. to handle the case floor(extract(hour from t.time)/3600.0) in $$