Re: pgadmin 4 enhancement request

From: Melvin Davidson <melvin6925(at)yahoo(dot)com>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgadmin 4 enhancement request
Date: 2017-04-19 14:17:41
Message-ID: 727383420.4548755.1492611461234@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)illinois(dot)edu>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Sent: Wednesday, April 19, 2017 10:05 AM
Subject: [pgadmin-support] pgadmin 4 enhancement request

<!--#yiv9583838928 _filtered #yiv9583838928 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv9583838928 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv9583838928 #yiv9583838928 p.yiv9583838928MsoNormal, #yiv9583838928 li.yiv9583838928MsoNormal, #yiv9583838928 div.yiv9583838928MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv9583838928 a:link, #yiv9583838928 span.yiv9583838928MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv9583838928 a:visited, #yiv9583838928 span.yiv9583838928MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv9583838928 p.yiv9583838928MsoListParagraph, #yiv9583838928 li.yiv9583838928MsoListParagraph, #yiv9583838928 div.yiv9583838928MsoListParagraph {margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv9583838928 span.yiv9583838928EmailStyle17 {font-family:"Calibri", sans-serif;color:windowtext;}#yiv9583838928 .yiv9583838928MsoChpDefault {font-family:"Calibri", sans-serif;} _filtered #yiv9583838928 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv9583838928 div.yiv9583838928WordSection1 {}#yiv9583838928 _filtered #yiv9583838928 {} _filtered #yiv9583838928 {margin-left:.75in;} _filtered #yiv9583838928 {margin-left:1.25in;} _filtered #yiv9583838928 {margin-left:1.75in;} _filtered #yiv9583838928 {margin-left:2.25in;} _filtered #yiv9583838928 {margin-left:2.75in;} _filtered #yiv9583838928 {margin-left:3.25in;} _filtered #yiv9583838928 {margin-left:3.75in;} _filtered #yiv9583838928 {margin-left:4.25in;} _filtered #yiv9583838928 {margin-left:4.75in;} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {} _filtered #yiv9583838928 {}#yiv9583838928 ol {margin-bottom:0in;}#yiv9583838928 ul {margin-bottom:0in;}-->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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Campbell, Lance 2017-04-19 14:42:24 Re: pgadmin 4 enhancement request
Previous Message Campbell, Lance 2017-04-19 14:04:51 pgadmin 4 enhancement request