Re: psql command aliases support - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: psql command aliases support
Date
Msg-id 200804031457.08166.peter_e@gmx.net
Whole thread Raw
In response to Re: psql command aliases support  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: psql command aliases support
Re: psql command aliases support
List pgsql-patches
Am Donnerstag, 3. April 2008 schrieb Gregory Stark:
> To be more explicit what I meant was someone doing
>
> #= \alias old select version();
> ...
> #= \oldd
> <oops>
> #= \old
> #= select 'where is all my output going?'
> #= select 'what happened to my ldd file?'

This is a valid concern, but it is orthogonal to the alias feature.  You have
the same problem already if you mistype

\oo instead of \o
\ofoo instead of \obar
\o instead of \p
\oset instead of \pset

or even more amusingly

\o foo instead of \i foo -- check your keyboard layout

and so on.

If you want to guard against typos, you need to remove the \o command in its
current form.  Prohibiting the addition of new commands, by whichever means,
is not going to help.  And we have never had a policy or real analysis
whether new or existing commands are typo-proof.

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: psql command aliases support
Next
From: Heikki Linnakangas
Date:
Subject: Re: [BUGS] BUG #4070: Join more then ~15 tables let postgreSQL produces wrong data