Allow SQL functions to be used as relations, close #29