cardiopteris (1) [Avatar] Offline
I am just a novice in PostGIS and PostgreSQL and had a problem to follow the suggestion on page 358:
"As a workaround, you can create a view with the desired SQL and render that. Don't forget to add a column to the view that can serve as a unique identifier."
Is there a simple way to add such a column which fit to queries which lack such an column in general? "ALTER VIEW" did not work.
Thanks for your help.
regina.leo (265) [Avatar] Offline
Re: how to add a column to a view that serve as a unique identifier
One of your underlying tables has to have a unique identifier and you add that to the view. Symmary views sadly will not work. there are some work arounds, but they are messy and more advanced.

Note: That QGIS does have an SQL ad hoc query tool now which is available as a plugin, so a work around may not be necesssary.