Closed thomasjoscht closed 4 years ago
SqlServer uses almost exactly the same sql, but includes a where clause- TABLE_TYPE='BASE TABLE'
The PostgreSql provider should do the same - so whichever database, TablesQuickView or TableList should return just tables, not views.
Hey, I need to identify the type of DatabaseTable, whether it is a view or not. Simple check for
table is DatabaseView
does not work.I'm mostly using
DatabaseReader.TablesQuickView
orDatabaseReader.TableList
for huge databases because of better performance. Both will give me a list of all tables inclusive views for some DbProvider like PostgreSQL. Without callingDatabaseReader.AllViews
I don't know which of these entries are real tables or views.Will it be possible to add a new property to DatabaseTable which allows to identify the type? In ANSI SQL-92 the field TABLE_TYPE of INFORMATION_SCHEMA.TABLES should contain "BASE TABLE" or "VIEW". Do you have any experience with this field?
My suggestions are:
What do you think? Regards Thomas