Re: Advices on custom data type and extension development

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Advices on custom data type and extension development
Дата
Msg-id 20160119200029.GA240963@alvherre.pgsql
обсуждение исходный текст
Ответ на Advices on custom data type and extension development  (Luciano Coutinho Barcellos <luciano@geocontrol.com.br>)
Список pgsql-hackers
Luciano Coutinho Barcellos wrote:

>         * the type would be 8 bytes long, being 4 dedicated to storing the
> Date, and 4 dedicated to storing a serial within that day;

Another thing to consider -- have you carefully defined what the
"current day" is?  This might sound a stupid question, but as far as I
remember Brazil has at least two timezones, which means that you could
have one date while far east and a different one at the west border of
the country.  If you misplace an order that a customer filed after 11pm,
they will be pretty pissed.  (This of course becomes more pressing if
you have things outside the country.)

If you simply state that dates are whatever is current in UTC zone,
you're covered.  (Pray you never get an order during a leap second.)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: Advices on custom data type and extension development
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [BUGS] about test_parser installation failure problem(PostgreSQL in 9.5.0)?