Re: Can you create aliases in the psql shell?

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Modulok <modulok(at)gmail(dot)com>, "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-11 00:32:50
Message-ID: 1360542770.82146.YahooMailNeo@web162906.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Modulok <modulok(at)gmail(dot)com> wrote:

> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2013-02-11 01:23:33 Upsert Functionality using CTEs
Previous Message Modulok 2013-02-11 00:11:32 Can you create aliases in the psql shell?