Bug report #11513

DBmanager layer load fails with semi-colon

Added by Gavin Fleming over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:19783

Description

The presence of a semi-colon at the end of a query in DBManager results in loading a layer failing. It should ignore the semi-colon or give a more informative message.

Unable to execute the query.
The error message from the database was:
ERROR:  syntax error at or near ";" 
LINE 1: ...nsform(the_geom,32733),100) from l_roads where gid = 327898;
                                                                      ^
.
SQL: SELECT * FROM (select gid,st_simplify(st_transform(the_geom,32733),100) from l_roads where gid = 327898;
) AS "subQuery_0" LIMIT 1

History

#1 Updated by Nyall Dawson over 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Already fixed in master

Also available in: Atom PDF