Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS layers lose the "public" schema in the table part of the URI #11081

Closed
qgib opened this issue Mar 31, 2008 · 2 comments
Closed

PostGIS layers lose the "public" schema in the table part of the URI #11081

qgib opened this issue Mar 31, 2008 · 2 comments
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request

Comments

@qgib
Copy link
Contributor

qgib commented Mar 31, 2008

Author Name: Steven Mizuno (Steven Mizuno)
Original Redmine Issue: 1021

Redmine category:data_provider
Assignee: Jürgen Fischer


Have found this problem in 0.9.1: when a table in the public schema has symbology set up or a where clause set, the schema portion of the table disappears from the "Source for this layer" item in properties/metadata. When a project is saved, then loaded, that layer won't load.

HEAD has the same behavior as far as the schema being cleared, but the project layer will load.

I believe that this would affect any table whose schema is the current schema in the database.

Have found in qgspostgresprovider.cpp: in the constructor, about line 160 when the current schema is tested and equals the table's schema, mUri.clearSchema() is called. Then setDataSourceUri(mUri) is called.

Several lines in this area are unnecessary as mCurrentSchema is tested/set here and never used anywhere else.

I believe the table's schema should be preserved throughout all operations; I don't see any particular advantage other than a slightly shorter query string being sent to the database.

summary of patch submitted:

  1. qgspostgresprovider.cpp : in the constructor, removed "current_schema()" from the sql command that retrieves table privileges; removed the various tests and setting of variables relating to current_schema / mCurrentSchema; retained the setDataSourceUri() call

  2. qgspostgresprovider.h : removed mCurrentSchema from the header


@qgib
Copy link
Contributor Author

qgib commented Apr 1, 2008

Author Name: Jürgen Fischer (@jef-n)


actually this is intentional and mimics OGR. See #10902.


  • resolution was changed from to wontfix
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Aug 21, 2009

Author Name: Anónimo (Anónimo)


Milestone Version 0.9.2 deleted

@qgib qgib added Feature Request Data Provider Related to specific vector, raster or mesh data providers labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant