Re: Advices on custom data type and extension development

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Luciano Coutinho Barcellos <luciano(at)geocontrol(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Advices on custom data type and extension development
Date: 2016-01-19 20:00:29
Message-ID: 20160119200029.GA240963@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-01-19 20:08:26 Re: about test_parser installation failure problem(PostgreSQL in 9.5.0)?
Previous Message Corey Huinker 2016-01-19 19:52:04 Re: Advices on custom data type and extension development