An even better way it looks like to organize the postgres/mysql functions