First steps towards pgsql support