lib/pg/doc/engine.rb in pg-doc-0.0.3 vs lib/pg/doc/engine.rb in pg-doc-0.0.4
- old
+ new
@@ -132,9 +132,10 @@
FROM
information_schema.columns c
JOIN information_schema.tables t USING (table_catalog, table_schema, table_name)
WHERE
#{@schema_filter.call :table_schema}
+ AND table_type = 'BASE TABLE'
ORDER BY
1, 2, 4
SQL
_recordset.each_with_object(@cache){ |row, h|
type = row.delete("table_type") == "VIEW" ? :views : :tables