switch to pg
convert wheres to psql format and get psql wired up