Re: psql: add \pset true/false

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: psql: add \pset true/false
Дата
Msg-id CAKFQuwZOvVZGrdyKFT5wA92nM7hxUnq93_WRtBfRq99vjPU3Bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: add \pset true/false  (Matthijs van der Vleuten <matthijs@zr40.nl>)
Список pgsql-hackers
On Thu, Oct 29, 2015 at 5:28 AM, Matthijs van der Vleuten <matthijs@zr40.nl> wrote:
I have had exactly this situation a week ago. I was testing the output of an algorithm that is supposed to have exactly one true value per input id.

​If this is particularly important I would add something like (and(col1, col2, col3, ...) = true) and/or NULLIF((not(col1)::int + not(col2)::int ..., 0) to the grid and check/test those instead of visually scanning the output.

​If the pretty presentation is destined for final output I'd say you really want to output text and write a function so that the logic is embedded in the query and not a side-effect of a specific environment.

David J.​


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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: psql: add \pset true/false
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Refactoring of LWLock tranches