Changed the table list extraction query from pg_table based one to pg_class one.

We need this to be able to get some extra information that is not available in the pg_tables. For examle relkind, to differentiale between regular and TOAST tables.