Re: psql command aliases support

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: psql command aliases support
Date: 2008-04-01 16:09:01
Message-ID: CAC87A1C50ED46CAB61B028D@imhotep.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

--On Dienstag, April 01, 2008 11:39:59 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Do we really want such a thing?

Well, i use aliases everytime and everywhere they got implemented and i
found it quite useful to _extend_ existing behavior (integrating additional
functionality in an easy way)

> The space of backslash command names
> is so densely populated already that it's hard to imagine creating
> aliases without conflicting with existing (or future) command names

I often found existing backslash command sometimes overloaded or simply not
providing information i really need (for example, an easy way to get
information about current locales, encoding and user settings). You simply
can't catch all requirements DBA's and users want within a all-catching
implementation. Using this way, users are able to implement their own
command shortcuts

Overriding existing backslash commands (as my first example shows) is only
an implementation-specific detail which could easily forbidden. However,
defining your own shortcuts for your psql-sessions looks quite useful to
me, like my 2nd example tries to illustrate.

> It seems like mostly a recipe for confusion.

So what? This could happen in every shell that supports aliases as well. I
don't get your point...?

--
Thanks

Bernd

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2008-04-01 16:17:34 Re: [HACKERS] Minor changes to Recovery related code
Previous Message Peter Eisentraut 2008-04-01 15:58:30 Re: psql command aliases support