Re: [HACKERS] To do for psql to show installable extensions

2015-01-12 Thread David Fetter
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  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  http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter  XMPP: david.fet...@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] To do for psql to show installable extensions

2015-01-12 Thread Pavel Stehule
Dne 12.1.2015 22:26 "Tom Lane"  napsal(a):
>
> Alvaro Herrera  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).

I like \dxa

Regards

Pavel
>
> regards, tom lane
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] To do for psql to show installable extensions

2015-01-12 Thread Tom Lane
Alvaro Herrera  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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] To do for psql to show installable extensions

2015-01-12 Thread Stephen Frost
* Jeff Janes (jeff.ja...@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


signature.asc
Description: Digital signature


Re: [HACKERS] To do for psql to show installable extensions

2015-01-12 Thread Alvaro Herrera
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 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 Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] To do for psql to show installable extensions

2015-01-12 Thread Jeff Janes
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