Skip to content

plpgsql: use floor for conversion, add integer tests #736

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

Merged
merged 1 commit into from
Jun 20, 2025
Merged

Conversation

drinckes
Copy link
Contributor

@drinckes drinckes commented Jun 20, 2025

See issues #674 and #717.

This corrects the implementation to use floor when converting from degrees to the integer values, and corrects the range checking in the ...ToInteger functions.

It also uses the encoding test CSV files to add many more tests for the encoding functions, and adds tests for the conversion of degrees to integer, and encoding from integers.

Tested by pasting pluscode_functions.sql and test_encoding.sql into several PostgreSQL interpretors (https://aiven.io/tools/pg-playground, https://db-fiddle.com, https://onecompiler.com/postgresql).

@drinckes drinckes merged commit 1f049ce into main Jun 20, 2025
35 checks passed
@drinckes drinckes deleted the plpgsql_674_717 branch June 20, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant