Open xiangjinwu opened 1 year ago
This issue has been open for 60 days with no activity.
If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity
label.
You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄
https://www.postgresql.org/docs/current/functions-math.html
Make sure to test special values:
-inf
,inf
,nan
for decimal / real / double, and-0
for real / double.proto ExprType 213, 214, 219, 221, 222, 233, 234, 245..=267, 401..=419
Cast
Polymorphic
+
/-
for smallint / int / bigint / decimal / real / double@
/abs
for smallint / int / bigint / decimal / real / double+
/-
//
/*
for various combinations%
/mod
for smallint / int / bigint / decimalgcd
/lcm
for int / bigint / decimal~
/&
/|
/#
for smallint / int / bigint<<
/>>
for lhs smallint / int / bigintFormatting
to_char
/to_number
in #8831For decimal and double
round
/trunc
/ceil
/ceiling
/floor
^
/pow
/power
#7725width_bucket(operand, low, high, count)
For decimal
factorial(bigint)
-> decimaldiv(decimal, decimal)
-> decimallog(decimal, decimal)
-> decimal #13150round(decimal, int)
-> decimaltrunc(decimal, int)
-> decimalmin_scale(decimal)
-> intscale(decimal)
-> inttrim_scale(decimal)
-> decimalFor double
||/
/cbrt
pi
sin
/cos
/tan
/cot
/asin
/acos
/atan
/atan2
Aggregate Functions
sum
avg
covar_pop
/covar_samp
corr
regr_avgx
/regr_avgy
/regr_count
/regr_intercept
/regr_r2
/regr_slope
/regr_sxx
/regr_sxy
/regr_syy
Set Returning Functions
generate_series(start, stop [, step])
for int / bigint / numeric #8826Impure
random
/setseed