[Qgis-user] custom db query plugin update

Ricardo Filipe Soares Garcia da ricardo.garcia.silva at gmail.com
Mon Dec 20 03:23:37 PST 2010


Hi Noli, thanks for testing out the plugin ;)

> Please investigate why I am getting the pk is 0 instead of 1.

As it currently stands, the plugin does not automatically create the
new table's primary key nor any indexes. That is something that must
be added afterwards, if needed.

For SQLite it is not possible to add a primary key after the table has
been created, but there are workarounds, see [1] and [2] for more on
this.
For postgreSQL it is possible to do so using the ALTER TABLE ... command.

I though these kinds of operations would be better suited to a manager
plugin (postgis manager can already do this), or perhaps the
'spatialite gui' application, that is why I haven't made much effort
into incorporating them.

Cheers


[1] - http://sqlite.org/faq.html#q11
[2] - http://www.mail-archive.com/sqlite-users@sqlite.org/msg30832.html


-- 
___________________________ ___ __
Ricardo Garcia Silva



More information about the Qgis-user mailing list