Numeric x^y is supported for x < 0 if y is an integer, but this
currently fails if y is outside the range of an int32:
SELECT (-1.0) ^ 2147483647;
?column?
---------------------
-1.0000000000000000
(1 row)
SELECT (-1.0) ^ 2147483648;
ERROR: cannot take logarithm of a negative number
because only the power_var_int() code path in power_var() handles
negative bases correctly. Attached is a patch to fix that.
Regards,
Dean