For postgres provider, get the layer comment from the table comment (if
it exists). Resolves ticket #244
git-svn-id: http://svn.osgeo.org/qgis/trunk@6726 c8812cc2-4d05-0410-92ff-de0c093fc19c
contain lots of views). Needs some testing, which I'll do in a day or
so.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6610 c8812cc2-4d05-0410-92ff-de0c093fc19c
layer). Has the side-effect of eliminating the postgresql server 'no
transaction in progress warnings'.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6171 c8812cc2-4d05-0410-92ff-de0c093fc19c
also works with other punctuation characters too.
Also a tidy up of some odd \ characters
git-svn-id: http://svn.osgeo.org/qgis/trunk@6113 c8812cc2-4d05-0410-92ff-de0c093fc19c
which table columns - the recent commit didn't work when the database had more
than one view, and in fact made things worse. Needs further work.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5959 c8812cc2-4d05-0410-92ff-de0c093fc19c
The longstanding problem where views that renamed their column names weren't
loaded is also fixed.
Another problem where qgis wouldn't load a table where the table name or key
column name contained capital letters is also fixed (everything is now
laboriously quoted correctly).
git-svn-id: http://svn.osgeo.org/qgis/trunk@5957 c8812cc2-4d05-0410-92ff-de0c093fc19c
* (#134) If a feature is edited using the Identify tool and QgsAttributeDialog, now only user-edited values are saved to the mChangedAttributes of the layer, previously it was all values. This now means that only those user-edited values are attempted to be committed when the user stops editing and saves (similar to if those values were edited using the Attribute Table).
* (#131) Modify QgsVectorLayer::stopEditing so that if a commit fails, the editing state is left alone (previously editing was still turned off anyway). This should be a better fix than r5591. I triggered the bug in #131 while testing for #134, therefore getting a 2-for-1 fix.
Some bonus features to assist people in the triggered situations described in #131 and #134:
* The Postgres Provider now reports an error to the user if a commit of changed attributes fails. This brings it up to the same behaviour of if a commit of changed geometries fails. Previously there was no response given on an changed attribute error, leaving the user to think the commit was successful.
* The Postgres Provider now reports the contents of the SQL used in a failed UPDATE statement. This may help the user to pinpoint which of his edits caused the error.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5694 c8812cc2-4d05-0410-92ff-de0c093fc19c
include the offending sql in the error dialog box.
Also fix the remaining part of ticket #131 - the code wasn't coping
correctly with blank data fields.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5637 c8812cc2-4d05-0410-92ff-de0c093fc19c
bug whereby the first byte after the wkb array was being set to \0
git-svn-id: http://svn.osgeo.org/qgis/trunk@5609 c8812cc2-4d05-0410-92ff-de0c093fc19c
when getting the user to fill in the column values for a just digitised
feature).
Also add tr() to some user visible text.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5602 c8812cc2-4d05-0410-92ff-de0c093fc19c
SQL statement - the database will ccorrectly interpret the quoted
text based on the data type of the column (e.g., text or numeric).
git-svn-id: http://svn.osgeo.org/qgis/trunk@5601 c8812cc2-4d05-0410-92ff-de0c093fc19c
Instead, for copying, the geometry and attributes are now retrieved from the provider in a random-access fashion.
For starting editing, the behaviour is regressed to the pre-r5489 idiom of geometry being cached as part of the screen redraw in editing mode.
This returns to the much better response when copying from large layers, with the additional benefit of copying selected features that had been panned off the canvas (previously a bug).
However, only Postgres and OGR providers have been updated to suit. Hopefully this is enough for a 0.8 release.
Bonus feature: The layer properties now shows what access method is used to access individual geometries (random or sequential)
Since this is a large change it would be appreciated if others can double checking my testing. (I have tested against PostGIS and MapInfo tables, and many different geometry adding/vertex editing combinations.)
git-svn-id: http://svn.osgeo.org/qgis/trunk@5595 c8812cc2-4d05-0410-92ff-de0c093fc19c
The attribute table was failing to display the contents of the last column
in a table for tables where the geometry column was not the last
in the table.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5552 c8812cc2-4d05-0410-92ff-de0c093fc19c
changed geometries to pre-1.0 PostGIS servers (pre-r3907). This also now includes
the ability to sniff the PostGIS version.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5549 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Postgres provider: Remove some declared but not defined functions that
were shadowing some inherited functions of the same name.
- Provide a function to give a version of the layer source without passwords
in it for use in user visible places. Altered relevant code to use
this.
- Moved the vector layer source text from the General tab into the
Metadata tab in the vector properties box (fits better in there,
particularly when the text is long).
- Added the sql text to the vector layer source text in appropriate places
and fixed a few cases of where it wasn't propagating to all of the places
that it should of been.
- Added a function to QgsDataSourceUri to give the uri in a single
qstring for display purposes.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5423 c8812cc2-4d05-0410-92ff-de0c093fc19c
geometry types that Qgis doesn't support.
- Properly close the postgres connection if the layer fails to load
- Fix up a missing \n
git-svn-id: http://svn.osgeo.org/qgis/trunk@5278 c8812cc2-4d05-0410-92ff-de0c093fc19c
required changes in all code that uses QgsMessageViewer)
- Improvements to messages when qgis can't find a key column in a
postgres table
- Fix a couple of bugs when loading postgres tables (invalid layers
would appear to load, giving a legend entry, but not show anything on
the map)
- Tidy up of #includes in postgres files
git-svn-id: http://svn.osgeo.org/qgis/trunk@4911 c8812cc2-4d05-0410-92ff-de0c093fc19c