diff --git a/lib/Ora2Pg.pm b/lib/Ora2Pg.pm index 49b569f8..0356fb99 100644 --- a/lib/Ora2Pg.pm +++ b/lib/Ora2Pg.pm @@ -6734,7 +6734,10 @@ sub _table_info $sth->finish(); $sql = "SELECT A.OWNER,A.TABLE_NAME,NVL(num_rows,1) NUMBER_ROWS,A.TABLESPACE_NAME,A.NESTED,A.LOGGING FROM ALL_TABLES A, ALL_OBJECTS O WHERE A.OWNER=O.OWNER AND A.TABLE_NAME=O.OBJECT_NAME AND O.OBJECT_TYPE='TABLE' $owner"; - $sql .= " AND A.TEMPORARY='N' AND (A.NESTED != 'YES' OR A.LOGGING != 'YES') AND (A.DROPPED IS NULL OR A.DROPPED = 'NO') AND A.SECONDARY = 'N'"; + $sql .= " AND A.TEMPORARY='N' AND (A.NESTED != 'YES' OR A.LOGGING != 'YES') AND A.SECONDARY = 'N'"; + if ($self->{db_version} =~ /Release [89]/) { + $sql .= " AND (A.DROPPED IS NULL OR A.DROPPED = 'NO')"; + } $sql .= " AND (A.OWNER, A.TABLE_NAME) NOT IN (SELECT OWNER, MVIEW_NAME FROM ALL_MVIEWS UNION ALL SELECT LOG_OWNER, LOG_TABLE FROM ALL_MVIEW_LOGS)"; $sql .= $self->limit_to_objects('TABLE', 'A.TABLE_NAME'); $sql .= " AND (A.IOT_TYPE IS NULL OR A.IOT_TYPE = 'IOT') ORDER BY A.OWNER, A.TABLE_NAME";