Gregory Stark escribió:

> Ah but I would use it. In particular the query I found myself writing *all*
> the time over and over again in Oracle was:
> 
> select count(*),n from (select count(*) as n from <tab> group by <col>) group 
> by n
> 
> I can type it out now from finger-memory without even thinking about it. I
> would have killed for a macro facility like this where I could just do
> 
> \query dist users city

If we separated the namespace with something that involved a bit less
typing, would you use it?  Say

\-dist users city

(Or some other char instead of hyphen)

The point is that you don't mix it with other \ commands, and as soon as
you put \- you can already press TAB to get a list of "aliases".  So it
_is_ useful both for interactive use and script use.

"\query dist" is good for scripts but bad for interactive: too much
extra typing.  Whereas "\dist" is only relatively good for interactive
(no good support for tab completion), and not any better for scripting.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to