Re: [psycopg] Using infinite values with DateTimeTZRange
Вложения
В списке psycopg по дате отправления:
| От | Jonathan Rogers |
|---|---|
| Тема | Re: [psycopg] Using infinite values with DateTimeTZRange |
| Дата | |
| Msg-id | c5cdbfa7-d640-4640-d9f1-0ec3ca25d773@emphasys-software.com обсуждение исходный текст |
| Ответ на | [psycopg] Using infinite values with DateTimeTZRange ("Fennell, Felix W." <felnne@bas.ac.uk>) |
| Список | psycopg |
On 08/20/2017 10:23 AM, Fennell, Felix W. wrote: > Hi, > > Apologies if this isn’t the right place to ask questions like this but I am having difficulty storing ‘infinite’ datesusing the DateTimeTZRange object. > > I have a Postgres database with a ‘tstzrange’ column (named validity) and I’d like to store a value in this similar to‘[“2010-01-01 10:00:00 +01”, infinity]’. While it is not an error to use 'infinity' or '-infinity' in a tstzrange, since those are acceptable timestamptz values, that is not the normal way to represent a range which extends infinitely in one direction. The normal way to represent a range with an infinite upper or lower bound is to omit the bound, as in '["2010-01-01 10:00:00 +01",]'. Read the manual for more detail: https://www.postgresql.org/docs/current/static/rangetypes.html#RANGETYPES-INFINITE -- Jonathan Rogers Socialserve.com by Emphasys Software jrogers@emphasys-software.com
В списке psycopg по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера