Re: Refining query statement

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Refining query statement
Дата
Msg-id alpine.LNX.2.20.1901170958220.18965@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Refining query statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Refining query statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Thu, 17 Jan 2019, Adrian Klaver wrote:

> Seems to me a boolean field of name active to denote contacts you need to
> keep up with is in order. Then make the next_contact field NOT NULL and
> replace the current NULL values with 'infinity':

> WHERE COALESCE(next_contact, 'infinity') BETWEEN '01/01/2019'::date AND
> 'today'::date

Adrian,

   Having added a new column, 'active' with boolean values (and a default of
true), would this WHERE clause work:

WHERE active = TRUE and next_contact <= 'today'::date

?

Regards,

Rich


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

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Refining query statement
Следующее
От: AI Rumman
Дата:
Сообщение: Re: Postgres Automated Failover