Re: Storing a time interval

Поиск
Список
Период
Сортировка
Искать
От
stan
Тема
Re: Storing a time interval
Дата
Msg-id
20191108203849.GA5401@panix.com
Ответ на
Список
Дерево обсуждения
Storing a time interval stan <stanb@panix.com>
Re: Storing a time interval Michael Lewis <mlewis@entrata.com>
Re: Storing a time interval Adrian Klaver <adrian.klaver@aklaver.com>
Re: Storing a time interval stan <stanb@panix.com>
Re: Storing a time interval Michael Lewis <mlewis@entrata.com>
Re: Storing a time interval Steve Baldwin <steve.baldwin@gmail.com>
Re: Storing a time interval Pankaj Jangid <pankaj.jangid@gmail.com>
On Fri, Nov 08, 2019 at 12:12:59PM -0800, Adrian Klaver wrote:
> 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.
> 
Thanks folks. 

After thinking over both your sugestions, I beleive teh optimum way to do this
may look like:


CREATE TYPE po_dates AS (
    po_isssued_date        timestamptz,
	discount_last_date     timestamptz,
	net_date               timestamptz
	);

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin


В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: Storing a time interval
От: Boylan, Ross
Дата:
Сообщение: firewall trouble on Windows
FAQ