Re: \gexec \watch

Поиск
Список
Период
Сортировка
От Oleksii Kliukin
Тема Re: \gexec \watch
Дата
Msg-id 727325C1-FB57-4C78-A9E6-17F44EBB7184@hintbits.com
обсуждение исходный текст
Ответ на Re: \gexec \watch  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi Álvaro,

> On 6. Dec 2018, at 13:56, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> To Oleksii's question, I think if you want to repeat the first query
> over and over, you'd use something like this:
>
> select format('select now() as execution_time, %L as generation_time', now()) as query \gset
> :query \watch

Nice one, although it only works if the original query outputs a single row (because of \gset).
I do agree it’s not that useful to reuse the original query instead of executing it anew each time.

Cheers,
Oleksii

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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: \gexec \watch
Следующее
От: Tom Lane
Дата:
Сообщение: Mutability of domain CHECK constraints