creating a function in Greenplum