Re: proposal or just idea for psql - show first N rows from relation backslash statement

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal or just idea for psql - show first N rows from relation backslash statement
Дата
Msg-id CAFj8pRBjTwsXx4KfzFJW-D0-KnwntW2mgypR6LexGsch5ML8Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Stephen Frost <sfrost@snowman.net>)
Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Hello


>
>
> I liked this idea, but thinking better we can implement a way to users
> create your own meta-commands to run:
>
> * another meta commands (like an alias)
> * SRFs
> * arbitrary SQLs
>
> All of them must accept arguments... some like this:
>
> \mset vt :table :rows 'select * from :table limit :rows'
>
> Then we can do exactly what you need:
>
> \vt foo 10
>
> \unset vt
>
> I don't know if it's a desired feature but I would love if it exists.
>

few year ago I proposed a implementation of macros - and I wrote a
prototype - enhanced psql

http://okbob.blogspot.cz/search?q=epsql

but now I don't think so enhancing psql in this direction is good way.
Enhanced console needs creating from scratch - it should be based on
some interpret language - LUA or javascript - probably it can be
better integrated to modern UI, can better do autocomplete - and this
design is out of my time possibilities and out of my targets.

Native implementation of \vt is terrible simple - and it is generic
and usual task

check it, please

Regards

Pavel

p.s. some simple form of bash alias command can be implemented, but
probably without autocomplete support

p.s.2. inside quotes or double quotes variables substitution doesn't work


> Best regards,
>
> --
> Fabrízio de Royes Mello
> Consultoria/Coaching PostgreSQL
>>> Blog sobre TI: http://fabriziomello.blogspot.com
>>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>>> Twitter: http://twitter.com/fabriziomello

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Law
Дата:
Сообщение: Re: BUG #7493: Postmaster messages unreadable in a Windows console
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Create libpgcommon, and move pg_malloc et al to it