Re: psql command aliases support

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, "Bernd Helmle" <mailings(at)oopsware(dot)de>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: psql command aliases support
Date: 2008-04-03 12:57:05
Message-ID: 200804031457.08166.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-04-03 13:22:34 Re: [BUGS] BUG #4070: Join more then ~15 tables let postgreSQL produces wrong data
Previous Message Dawid Kuroczko 2008-04-03 12:44:53 Re: psql \G command -- send query and output using extended format