this currently works but does the stupid type(psycopg2.Date()) thing to get psycopg types