Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: mathematical functions #8806

Open
28 of 30 tasks
xiangjinwu opened this issue Mar 28, 2023 · 1 comment
Open
28 of 30 tasks

Tracking: mathematical functions #8806

xiangjinwu opened this issue Mar 28, 2023 · 1 comment

Comments

@xiangjinwu
Copy link
Contributor

xiangjinwu commented Mar 28, 2023

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

  • implicit: smallint -> int -> bigint -> decimal -> real -> double
  • assign: double -> real -> decimal -> bigint -> int -> smallint

Polymorphic

  • unary + / - for smallint / int / bigint / decimal / real / double
  • @ / abs for smallint / int / bigint / decimal / real / double
  • binary + / - / / / * for various combinations
  • % / mod for smallint / int / bigint / decimal
  • gcd / lcm for int / bigint / decimal
  • ~ / & / | / # for smallint / int / bigint
  • << / >> for lhs smallint / int / bigint

Formatting

For decimal and double

For decimal

For double

Aggregate Functions

Set Returning Functions

Impure

  • random / setseed
Copy link
Contributor

github-actions bot commented Jul 3, 2024

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. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant