Skip to content

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

Merged
drinckes merged 1 commit intomainfrom
plpgsql_674_717
Jun 20, 2025
Merged

plpgsql: use floor for conversion, add integer tests#736
drinckes merged 1 commit intomainfrom
plpgsql_674_717

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