Thread: Enhancement request
Enhancement request 1:
Would you please consider adding a configuration parameter that would allow people to view tables with the columns sorted?
Example of a system parameter a user could set for the default display of columns in all tables:
Sort all table columns by: {pulldown option}
Pulldown options would be:
1) natural order
2) alphabetical
3) primary keys | alphabetical
4) primary keys | foreign keys | alphabetical
I have some tables that have nearly a hundred columns. It would be so helpful to be able to see the columns in a sorted order so I can find a field.
Enhancement request 2:
A user can select a table. After selecting it one of the options is to reorder the columns permanently. When selected the user could pick one of the following options:
1) alphabetical
2) primary keys | alphabetical
3) primary keys | foreign keys | alphabetical
After selecting one of the above PGAdmin will reorder the columns so they are in the selected order.
NOTE: I have thought about writing a Java application that would do #2. The algorithm would basically create a Java list of the ideal column order. Then it would alter the table adding the first ideal column to the table with a header in front of the new column name. Then it would update the new column with the data from the table’s original column. Then it would drop the original column. Finally, it would rename the new column to the original column name. Then it would grab the next column from the Java list. After the Java list has been processed the table will be in the ideal order.
I personally think it is odd that there is not a way to automate this processes in databases. I cannot be the only person that adds new columns to pre-existing tables that contain enormous numbers of columns. It just seems like a very natural thing to sort columns in table by a particular order so that one can work with tables in a more natural way. I understand that in the past there was and may still be a need to have certain types of columns before others. Example: one might want an order like primary keys, foreign keys, Booleans, integers, numbers, then text at the end. But with the improvements of hardware, in many cases the real cost is in people working with data. Making things very readable is a real cost savings and reduces risk and silly errors.
Thanks for considering this. I greatly appreciate both PostgreSQL and PGAdmin. I have been using both for 14 years. I absolutely love both products.
Lance