[Qgis-developer] Default postgis layername format

strk strk at keybit.net
Fri Jun 12 07:18:07 EDT 2009


Just so it doesn't get lost, I'd like to suggest an improvement
to the default naming convention for layers loaded from postgis
columns.

My use case is: have XMLTester (from GEOS) produce an SQL file
containing informations about a testcase run, load the SQL 
in postgis, have qgis show me what happened.
The XMLTester produced SQL creates a single table, with columns
for the input(s), the expected output and the obtained output.

Current qgis only uses the table name by default, so I miss
which layer was which (expected or obtained or input ?). Thus
I always find myself manually renaming the columns.

Jef correctly pointed out that using <table>.<colum> always might
be too verbose for the "normal" use. And I can add to that
sometimes one would want even more (<db>.<schema>.<table>.<col>).
So my suggestion would be to make it a user preference, using
a format with labels substitution, like:

	DefaultPostgisLayerName %d.%s.%t.%c

With the default being just %t to match the current behaviour.

Do you like the idea ?


--strk; 

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 


More information about the Qgis-developer mailing list