Re: Advices on custom data type and extension development - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Advices on custom data type and extension development
Date
Msg-id 20160119200029.GA240963@alvherre.pgsql
Whole thread Raw
In response to Advices on custom data type and extension development  (Luciano Coutinho Barcellos <luciano@geocontrol.com.br>)
List 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 by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Advices on custom data type and extension development
Next
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] about test_parser installation failure problem(PostgreSQL in 9.5.0)?