Bug report #14363
Qgis DB Manager runs, but cannot export
|Affected QGIS version:||2.12.2||Regression?:||No|
|Operating System:||windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22346|
When i try to execute this code in Qgis DB Manager, it works https://github.com/baditaflorin/osm-postgis-scripts/blob/test/nodes_grid_counter.sql
But if i want to create a view, or load as new layer, then i get a error
syntax error at or near "CREATE"
LINE 22: CREATE OR REPLACE FUNCTION public.makegrid_2d (
I have ilustated the process in this youtube video, so you can see better https://www.youtube.com/watch?v=mFH2NOnxezk
#3 Updated by Giovanni Manghi almost 5 years ago
baditaflorin - wrote:
Can you please point me to why this is happening?
Can I circumvent this somehow?
I want to create something simple, and if I require first the user to do step 1, and then load another script, paste it into the DB manager, will be more complicated.
There is nothing to circumvent or fix here, in my opinion. The "load as new layer" work that way: you run a SELECT query that returns a table, and then you can use this functionality to load it into the project. If you need more SQL code in the DB Manager SQL panel, just select the part of it that is about the SELECT statement, and run just it.