Re: [pgadmin-support] pgadmin 4 enhancement request - Mailing list pgadmin-support

From Melvin Davidson
Subject Re: [pgadmin-support] pgadmin 4 enhancement request
Date
Msg-id 727383420.4548755.1492611461234@mail.yahoo.com
Whole thread Raw
In response to [pgadmin-support] pgadmin 4 enhancement request  ("Campbell, Lance" <lance@illinois.edu>)
Responses Re: [pgadmin-support] pgadmin 4 enhancement request  ("Campbell, Lance" <lance@illinois.edu>)
List pgadmin-support
Lance,

I am not a PgAdmin developer, but you can easily accomplish what you want with either of the
following two queries:

-- Returns all columns for a specified table
SELECT c.relname as table,
       a.attname as column,
       t.typname as type
--       t.typlen  as length,
--       a.attrelid
  FROM pg_class c
  JOIN pg_attribute a ON ( a.attrelid = c.oid )
  JOIN pg_type t ON (t.oid = a.atttypid )
 WHERE relname = '<YOUR_TABLE>'
   AND attnum > 0
   AND NOT attisdropped
 ORDER BY 2;
 --a.attnum;

-- OR Use INFORMATION_SCHEMA.COLUMNS
SELECT column_name,
       data_type,
       character_maximum_length as length,
       column_default as default
 FROM INFORMATION_SCHEMA.COLUMNS where table_name = '<YOUR_TABLE>'
ORDER BY 1;
--ordinal_position;

Melvin Davidson 🎸
    Cell 720-320-0155
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com




From: "Campbell, Lance" <lance@illinois.edu>
To: "pgadmin-support@postgresql.org" <pgadmin-support@postgresql.org>
Sent: Wednesday, April 19, 2017 10:05 AM
Subject: [pgadmin-support] pgadmin 4 enhancement request

In pgadmin 4 in the left hand navigation you can select the “Columns” label under any table listed in order to get a list of all columns within a table.
 
A fantast enhancements would be to add to the “File >> Preferences” the ability to do either option #1 or #2 listed below:
 
1)      A question in File >> Preferences to sort the default display of Columns listed in the left hand navigation alphabetically versus the natural table order.
 
OR
 
2)      A question in the File >> Preferences that says something like “What order would you like the Columns to be listed by default in the left hand navigation:” .  Then have three radio button options:
a)      Natural order
b)      Alphabetical order
c)       Grouped by primary key, then foreign keys, then other columns.  Within foreign keys and other columns list them alphabetical.
 
I know you have a lot going on.  I am sure this enhancement seems trivial.  But when you have a table with a lot of columns this is an amazing feature to have.  Before the release of 4-1.4 I was using a different admin tool.  I found this feature exceptionally nice and very useful. 
 
Thanks for considering this feature request.
 
Lance


pgadmin-support by date:

Previous
From: "Campbell, Lance"
Date:
Subject: [pgadmin-support] pgadmin 4 enhancement request
Next
From: "Campbell, Lance"
Date:
Subject: Re: [pgadmin-support] pgadmin 4 enhancement request