Hi, about PostgeSQL you can look here:

https://www.postgresql.org/docs/9.1/static/datatype-datetime.html

Some details about time in firebird:

Now using 30 bits from 32 available bits for time.

Max value is 864 000 000-1, I'm not sure how firebird play with leap second.

Postgre using in time stamp 5 bits for time (see limited range for date in compare with pure date).

This mean 37 bits that allow to measure with microsecond precision.

In Firebird, time accuracy can be extended 4 times (2 bits are spare) without changing date part, but will needs new datatype on API level.

Slavek

Ing. Slavomir Skopalik
Executive Head
Elekt Labs s.r.o.
Collection and evaluation of data from machines and laboratories
by means of system MASA (http://www.elektlabs.cz/m2demo)
-----------------------------------------------------------------
Address:
Elekt Labs s.r.o.
Chaloupky 158
783 72 Velky Tynec
Czech Republic
---------------------------------------------------------------
Mobile: +420 724 207 851
icq:199 118 333
skype:skopaliks
e-mail:skopa...@elektlabs.cz
http://www.elektlabs.cz

On 24.3.2018 10:19, Dmitry Yemanov wrote:
24.03.2018 11:04, Mark Rotteveel wrote:

Why is the maximum precision of CURRENT_TIME(p) and CURRENT_TIMESTAMP(p) three (3) and not four (4)? The underlying data type has a precision up to 100 microseconds.

IIRC (but I may be wrong, it was lots of time ago): we cannot provide microsecond precision (only 4 digits are possible) and millisecond precision was easier to explain than 1/10 millisecond precision.

That said, I see no problems changing MAX_TIME_PRECISION to 4. Even better would be to support microseconds, but this would require a new underlying datatype. If I'm not mistaken, PostgreSQL uses 8-byte timestamp storage and provides microsecond precision, but I suppose their supported range of dates somewhat differs.


Dmitry

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to