Bug report #6599
Tables in current_schema() gets loaded with no schema info in the URI
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15789|
So you can't, from a plugin for example, get to the schema containing the table in an easy way, despite the fact that the layer IS a table (rather than a query).
Also note that the presence of a schema is sometimes used to conditionally execute some code (for instance in QgsPostgresProvider::getGeometryDetails)
#2 Updated by Sandro Santilli over 10 years ago
I've been told the ticket is also here, with same number #843
I haven't understood the steps to take to reproduce the problem described there.
All I understood is that someone was using v.in.ogr in a way which is not supported, but I didn't undersand who/_what_