Re: Can you create aliases in the psql shell?

From: Modulok <modulok(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can you create aliases in the psql shell?
Date: 2013-02-12 12:05:20
Message-ID: CAN2+EpYsiU3hKEiHpsLu-jjAVyxH-Jxi0mujc30aK+PrNpc_mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> Is there a way to create command aliases in the psql shell? I can never
>
>> remember all the \d* commands and have to look them up every time. If I
>> could
>> create things like \list_databases, \list_tables, \list_roles, etc,
>> it would be
>> much easier for me to remember.
>>
>> Is there a way to create such aliases? I'm using 9.2.3 if that matters. I
>> didn't see anything in the man page. If not is there another command line
>> client interface?
>
> \set list_databases '\\l'
>
> Then you can type :list_databases to get the same effect as \l
>
> -Kevin

Thank you. This is perfect!

-Modulok-

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2013-02-12 13:28:26 Re: PG V9 on NFS
Previous Message Seref Arikan 2013-02-12 11:02:48 Re: What does Postgresql do when using CASE WHEN without ELSE?