Feature request #52

Change order of PostGIS Layer in Layer select box

Added by Redmine Admin over 18 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:Gary Sherman
Category:GUI
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:10111

Description

In qgis/src/gui/qgsdbsourceselect.cpp change line 520 from

sql += " order by f_table_name";
to
sql += " order by f_table_schema,f_table_name";

As the result prior the schemanames will be ordered and than the tablenames.
It is much more easier to find a layer.

History

#1 Updated by Gary Sherman over 18 years ago

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

Fixed in 768c876c (SVN r5185)

#2 Updated by Mike Taves over 15 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

My projects use multiple geometry columns for each table, and I've noticed the geometry column having different sortings.

So naturally, please update qgis/src/app/qgsdbsourceselect.cpp:

558c558
<                 "order by f_table_schema,f_table_name";
---
>                 "order by f_table_schema,f_table_name,f_geometry_column";

#3 Updated by Paolo Cavallini over 15 years ago

Can the patch be applied?

#4 Updated by Jürgen Fischer over 15 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

applied in 5329e674 (SVN r10673)

Also available in: Atom PDF