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

From daveg
Subject Re: psql command aliases support
Date
Msg-id 20080403210012.GG15267@sonic.net
Whole thread Raw
In response to Re: psql command aliases support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Thu, Apr 03, 2008 at 01:19:21PM -0400, Tom Lane wrote:
> Gregory Stark <stark@enterprisedb.com> writes:
> > I think you have to find a syntax where the current commands continue to mean
> > exactly what they always meant and where typos can't result in an entirely
> > different kind of behaviour.
>
> Yeah, the fundamental difference between the backslash command situation
> and aliases in shells and suchlike is that, because we've historically
> allowed no space between command name and argument, it's not that easy
> to tell what string ought to be compared against alias names.
>
> I think that an alias facility would only be acceptably safe if we
> disallowed that syntax (ie, start to *require* a space between command
> and args).  Are we ready to do that?

+1

-dg


--
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Expose checkpoint start/finish times into SQL.
Next
From: Andrew Dunstan
Date:
Subject: Re: Expose checkpoint start/finish times into SQL.