[Info-ingres] why is an empty string an integer
Roy Hann
specially at processed.almost.meat
Wed Jul 29 09:01:00 UTC 2020
Martin Bowes wrote:
> Is this a bug? Documented behaviour?
I don't recall seeing it documented. I don't think it is a bug though.
It might be mis-feature but it would appear to be forced on us. If you
think of "is integer" meaning "is this a value which Ingres will treat
as an integer", Ingres has always treated '' as zero except in the
special case
SELECT ''
which does return an empty string.
Otherwise all these return numbers of one sort or another:
SELECT 1+'';
SELECT 1*'';
SELECT cos('');
SELECT 0**'';
And this gives the predictable error:
SELECT 1/'';
Roy
More information about the Info-ingres
mailing list