qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.46k stars 2.99k forks source link

DB manager: impossible to create a view in another schema than public #35767

Open lucienicolier opened 4 years ago

lucienicolier commented 4 years ago

When you create a new view in a PostgreSQL from the DB Manager, it always creates it in the public schema even if you precise another schema.

  1. Go to DB Manager
  2. Use SQL query to create a view in another schema than public
  3. The view is created in the public schema

QGIS and OS versions QGIS version 3.10.4-A Coruña QGIS code revision 10bc9f2ff2 Compiled against Qt 5.11.2 Running against Qt 5.11.2 Compiled against GDAL/OGR 3.0.4 Running against GDAL/OGR 3.0.4 Compiled against GEOS 3.8.1-CAPI-1.13.3 Running against GEOS 3.8.1-CAPI-1.13.3 Compiled against SQLite 3.29.0 Running against SQLite 3.29.0 PostgreSQL Client Version 11.5 SpatiaLite Version 4.3.0 QWT Version 6.1.3 QScintilla2 Version 2.10.8 Compiled against PROJ 6.3.1 Running against PROJ Rel. 6.3.1, February 10th, 2020 OS Version Windows 10 (10.0) Active python plugins QgisModelBaker; qgis_resource_sharing; quick_map_services; vector_tiles_reader; db_manager; MetaSearch; processing

gioman commented 4 years ago

@lucienicolier Can't confirm here, same OS same QGIS version.

Gustry commented 4 years ago

@gioman I think @lucienicolier is using the Create view button which indeed it's not asking for a destination schema and the view is created in the public schema. Can you confirm @lucienicolier?

gioman commented 4 years ago

which indeed it's not asking for a destination schema

ok, I tested the full SQL way. If the issue is with the "create view" button I would say that this is a feature request.

lucienicolier commented 4 years ago

Yes it was about "create view" button. If you prefer it is a feature request, please change. Thanks