Обсуждение: psql commands for SQL/MED

Поиск
Список
Период
Сортировка

psql commands for SQL/MED

От
Peter Eisentraut
Дата:
The current proposed patch allocates the following psql \d commands:

\dw    show foreign-data wrappers
\dr    show foreign servers
\dm    show user mappings

One might object that this allocates valuable letters for infrequently 
used functionality.

In an idle second I thought, how about F for "foreign", but of course 
\dF* is already used for full-text search.  We could overload the F, but 
it might be weird.

Other ideas?


Re: psql commands for SQL/MED

От
Dimitri Fontaine
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Le 12 déc. 08 à 12:58, Peter Eisentraut a écrit :
> The current proposed patch allocates the following psql \d commands:
[...]
> In an idle second I thought, how about F for "foreign", but of
> course \dF* is already used for full-text search.  We could overload
> the F, but it might be weird.
>
> Other ideas?

What about \dM prefix, M standing for MED? It seems free in my 8.3
psql here.

Regards,
- --
dim



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAklCWOkACgkQlBXRlnbh1bkaWgCaA2Y02028n/+3BYPImJTEKJq8
ozgAn2v/XC+uSZy3imKCLW/tFt9Ohrik
=1ttA
-----END PGP SIGNATURE-----


Re: psql commands for SQL/MED

От
Alvaro Herrera
Дата:
Dimitri Fontaine wrote:

> Le 12 déc. 08 à 12:58, Peter Eisentraut a écrit :

>> In an idle second I thought, how about F for "foreign", but of course 
>> \dF* is already used for full-text search.  We could overload the F, 
>> but it might be weird.
>>
>> Other ideas?
>
> What about \dM prefix, M standing for MED? It seems free in my 8.3 psql 
> here.

So \dMf for foreign servers, \dMu for user mappings, etc?  That seems good.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: psql commands for SQL/MED

От
Martin Pihlak
Дата:
Alvaro Herrera wrote:
>> What about \dM prefix, M standing for MED? It seems free in my 8.3 psql 
>> here.
> 
> So \dMf for foreign servers, \dMu for user mappings, etc?  That seems good.
> 

I find the mixed case commands somewhat inconvinient -- too easy to make
typing mistakes, also slow to enter. If we can afford it, I would suggest
\dmw, \dms and \dmu (wrappers, servers and user mappings).

regards,
Martin



Re: psql commands for SQL/MED

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Dimitri Fontaine wrote:
>> What about \dM prefix, M standing for MED? It seems free in my 8.3 psql 
>> here.

> So \dMf for foreign servers, \dMu for user mappings, etc?  That seems good.

I'd suggest "e" for external.  "M" for "management" is a pretty useless
mnemonic --- what's being managed?
        regards, tom lane


Re: psql commands for SQL/MED

От
David Fetter
Дата:
On Fri, Dec 12, 2008 at 08:24:36AM -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Dimitri Fontaine wrote:
> >> What about \dM prefix, M standing for MED? It seems free in my
> >> 8.3 psql here.
> 
> > So \dMf for foreign servers, \dMu for user mappings, etc?  That
> > seems good.
> 
> I'd suggest "e" for external.  "M" for "management" is a pretty
> useless mnemonic --- what's being managed?

\def, \deu, etc. sound great :)

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


Re: psql commands for SQL/MED

От
Alvaro Herrera
Дата:
David Fetter wrote:
> On Fri, Dec 12, 2008 at 08:24:36AM -0500, Tom Lane wrote:

> > I'd suggest "e" for external.  "M" for "management" is a pretty
> > useless mnemonic --- what's being managed?
> 
> \def, \deu, etc. sound great :)

\dew     show foreign-data wrappers
\des     show foreign servers
\deu     show user mappings

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: psql commands for SQL/MED

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> \dew     show foreign-data wrappers
> \des     show foreign servers
> \deu     show user mappings

Right, but maybe use "external" rather than "foreign" in the help
so that people recognize what the mnemonic is.
        regards, tom lane


Re: psql commands for SQL/MED

От
Josh Berkus
Дата:
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> \dew     show foreign-data wrappers
>> \des     show foreign servers
>> \deu     show user mappings

I'd prefer "external" rather than foreign, because new users could 
confuse the latter with "foreign keys".

--Josh