Re: Storing a time interval

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Storing a time interval
Дата
Msg-id 143433ed-b3f2-2749-4ae8-d282dcb7f3ce@aklaver.com
обсуждение исходный текст
Ответ на Re: Storing a time interval  (Michael Lewis <mlewis@entrata.com>)
Ответы Re: Storing a time interval
Список pgsql-general
On 11/8/19 11:57 AM, Michael Lewis wrote:
> You certainly could choose to store as tstzrange, but why not use two 
> fields?
> 
> https://www.postgresql.org/docs/current/rangetypes.html

I would lean more to a composite type:

https://www.postgresql.org/docs/11/rowtypes.html

Range types are built around looking for values within the range, 
whereas the OP is looking for two discrete values. The two field method 
you suggest above also encapsulates that.




-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: Storing a time interval
Следующее
От: stan
Дата:
Сообщение: Re: Storing a time interval