Обсуждение: To do for psql to show installable extensions
I'd like to propose a wiki to-do item for a backslash command in psql which would show all installable extensions, basically just a wrapper around 'select * from pg_available_extensions'.
I've wanted it a few times recently, mostly in testing.
Any reason this wouldn't be desirable? What should it be called? I thought of \dx+, but the + is already used to show the objects associated with the extensions. (Althought it seems like it would more in keeping with other usage if \dx+ only listed the objects if it was given a pattern, and did what I propose if given no pattern)
Cheers,
Jeff
Jeff Janes wrote: > I'd like to propose a wiki to-do item for a backslash command in psql which > would show all installable extensions, basically just a wrapper around > 'select * from pg_available_extensions'. > > I've wanted it a few times recently, mostly in testing. +1. > Any reason this wouldn't be desirable? No idea. I guess if pg_available_extensions is acceptable, a \-command should be acceptable as well. But you might as well look up the old discussions that led to the current situation where we have an SRF and not a \-command. > What should it be called? \dxx / \dxi ? As long as it shows in \dx<tab> I am fine with almost anything sensible, really. > I thought of \dx+, but the + is already used to show the objects > associated with the extensions. (Althought it seems like it would > more in keeping with other usage if \dx+ only listed the objects if it > was given a pattern, and did what I propose if given no pattern) I hate the pattern/no pattern discrepancy -- I vote not to propagate it any further. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
* Jeff Janes (jeff.janes@gmail.com) wrote: > I'd like to propose a wiki to-do item for a backslash command in psql which > would show all installable extensions, basically just a wrapper around > 'select * from pg_available_extensions'. I guess I don't feel very strongly for or against adding a backslash command for this, but just wanted to mention that you can use table, as in: table pg_available_extensions; Slightly shorter. :) Thanks, Stephen
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > Jeff Janes wrote: >> I thought of \dx+, but the + is already used to show the objects >> associated with the extensions. (Althought it seems like it would >> more in keeping with other usage if \dx+ only listed the objects if it >> was given a pattern, and did what I propose if given no pattern) > I hate the pattern/no pattern discrepancy -- I vote not to propagate it > any further. The set of things that is known about an installed extension is quite a bit different from what is known about an uninstalled-but-available one. To make \dx print both categories would require dumbing it down to print only the intersection of those things, or else some fancy footwork and a lot of NULL column values. -1 for that. (This is exactly why pg_available_extensions is separate from pg_extension in the first place.) I'm okay with inventing some new command like "\dxu" or "\dxa" (mnemonic "uninstalled" or "available" respectively). regards, tom lane
<p dir="ltr"><br /> Dne 12.1.2015 22:26 "Tom Lane" <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>> napsal(a):<br/> ><br /> > Alvaro Herrera <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>writes:<br /> > > Jeff Janes wrote:<br /> >>> I thought of \dx+, but the + is already used to show the objects<br /> > >> associated with the extensions. (Althought it seems like it would<br /> > >> more in keeping with other usage if \dx+ only listed theobjects if it<br /> > >> was given a pattern, and did what I propose if given no pattern)<br /> ><br /> >> I hate the pattern/no pattern discrepancy -- I vote not to propagate it<br /> > > any further.<br /> ><br/> > The set of things that is known about an installed extension is quite<br /> > a bit different from whatis known about an uninstalled-but-available<br /> > one. To make \dx print both categories would require dumbingit down<br /> > to print only the intersection of those things, or else some fancy<br /> > footwork and a lotof NULL column values. -1 for that. (This is exactly<br /> > why pg_available_extensions is separate from pg_extensionin the first<br /> > place.)<br /> ><br /> > I'm okay with inventing some new command like "\dxu" or"\dxa" (mnemonic<br /> > "uninstalled" or "available" respectively).<p dir="ltr">I like \dxa<p dir="ltr">Regards<p dir="ltr">Pavel<br/> ><br /> > regards, tom lane<br /> ><br /> ><br /> > --<br />> Sent via pgsql-hackers mailing list (<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/> > To make changes to your subscription:<br/> > <a href="http://www.postgresql.org/mailpref/pgsql-hackers">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/>
On Mon, Jan 12, 2015 at 01:05:16PM -0800, Jeff Janes wrote: > I'd like to propose a wiki to-do item for a backslash command in psql which > would show all installable extensions, basically just a wrapper around > 'select * from pg_available_extensions'. > > I've wanted it a few times recently, mostly in testing. If your psql has libreadline, you can CREATE EXTENSION <tab><tab> and get a list. It doesn't distinguish between installed ones and available, though. > Any reason this wouldn't be desirable? What should it be called? I thought > of \dx+, but the + is already used to show the objects associated with the > extensions. (Althought it seems like it would more in keeping with other > usage if \dx+ only listed the objects if it was given a pattern, and did > what I propose if given no pattern) For what it's worth, of the proposals so far, I like \dxa most. Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate