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

Added function support for polymorphic types #475

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

Hydrocharged
Copy link
Collaborator

@Hydrocharged Hydrocharged commented Jul 3, 2024

This adds the types anyelement and anynonarray, in addition to adding support for defining functions that use polymorphic types.

https://www.postgresql.org/docs/15/extend-type-system.html#EXTEND-TYPES-POLYMORPHIC

Besides the changes to function resolution, this also adds a new parameter so that functions can see which types are passed in. This also cleans up the function interface, so that function definitions are a little more consistent and slightly less prone to typos (such as changing function parameters to an array from a slice, so that the length must be defined).

@Hydrocharged Hydrocharged requested a review from tbantle22 July 3, 2024 10:57
Copy link
Contributor

@tbantle22 tbantle22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm given I'm not super familiar with this function code

@Hydrocharged Hydrocharged merged commit 8883be6 into main Jul 3, 2024
12 checks passed
@Hydrocharged Hydrocharged deleted the daylon/any-support branch July 3, 2024 19:10
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.

2 participants