Postgres Get Table Names From Sql Statement To Create