Postgres / TDateTime
Posted: Tue 27 Apr 2021 06:03
Hello,
under Postgres, very small date values (<01.01.0100) are always set to the value MinDateTime. TimeStamp values, on the other hand, work without problems.
Very small values can lead to inaccuracies, but there is no reason for this restriction. The Postgres database supports values from 4713BC.
Since there is no need for this restriction for timestamp values and this is also interpreted as TDateTime, it would only be logical to remove this restriction.
At least the date 01/01/0000 should still be possible.
Greetings,
Manuel
under Postgres, very small date values (<01.01.0100) are always set to the value MinDateTime. TimeStamp values, on the other hand, work without problems.
Very small values can lead to inaccuracies, but there is no reason for this restriction. The Postgres database supports values from 4713BC.
Since there is no need for this restriction for timestamp values and this is also interpreted as TDateTime, it would only be logical to remove this restriction.
Code: Select all
unit PGClassesUni;
(...)
class procedure TPgBinaryConverter.ReadDate(Source: TPgSQLNet; Dest: IntPtr);
Greetings,
Manuel