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

From Tom Lane
Subject Re: psql command aliases support
Date
Msg-id 4991.1207243161@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql command aliases support  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: psql command aliases support  (daveg <daveg@sonic.net>)
List pgsql-patches
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?

This discussion really needs to be moved to someplace more widely read
than -patches, btw.

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Re: [BUGS] BUG #4070: Join more then ~15 tables let postgreSQL produces wrong data
Next
From: Tom Lane
Date:
Subject: Re: Re: [BUGS] BUG #4070: Join more then ~15 tables let postgreSQL produces wrong data