Re: psql command aliases support

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

On Thu, Apr 03, 2008 at 01:19:21PM -0400, Tom Lane wrote:
> Gregory Stark <stark(at)enterprisedb(dot)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(at)sonic(dot)net 510 536 1443 510 282 0869
If simplicity worked, the world would be overrun with insects.

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-03 21:19:19 Re: Configurable Penalty Costs for Levenshtein
Previous Message Alvaro Herrera 2008-04-03 20:57:51 Re: GUC parameter cursors_tuple_fraction