fixed Pgsql class