On 19-08-2022 12:05, Adriano dos Santos Fernandes wrote:
You prefer large over smaller VARCHARs, prefer TIMESTAMP over TIME -
widest types
But prefer TIMESTAMP and NUMBERS over VARCHAR - most specific
I see no logic in your approach.
Most specific in the sense that a datetime type is more specific than a
string type, for the TIME+TIMESTAMP+VARCHAR example: a TIMESTAMP value
contains TIME, so covers both TIME and TIMESTAMP, and a TIMESTAMP is
convertible to string, so can also be used with VARCHAR. On the other
hand, not all string values are convertible to a TIME or TIMESTAMP value.
On the other hand, maybe that could lead to other weird issues (e.g.
consider a query TIME+VARCHAR that works fine, but stops working when
TIMESTAMP is added in the mix.
So, maybe using VARCHAR instead for those cases is the least intrusive
alternative after all :(
Mark
--
Mark Rotteveel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel