Home / Companies / Yugabyte / Blog / Post Details
Content Deep Dive

Polymorphism in SQL part two – variadic functions

Blog post from Yugabyte

Post Details
Company
Date Published
Author
Bryn Llewellyn
Word Count
2,280
Company Posts That Month
9
Language
English
Hacker News Points
-
Post removed?
No
Summary

Polymorphism in SQL part two – variadic functions is a topic related to PostgreSQL and its variant YSQL, which allows users to create user-defined functions with dynamically determined return values using the "anyelement" and "anyarray" pseudo-types. The "variadic" keyword is also used to create functions that can accept a comma-separated list of any number of input actual arguments. These features are useful for implementing aggregate functions in a polymorphic way, allowing them to be used outside the context of SQL subqueries. The implementation of these functions requires careful consideration of the data types involved and how they relate to each other. The use of "anyelement" and "anyarray" pseudo-types allows for a more flexible and powerful approach to function implementation, while the "variadic" keyword provides a convenient way to handle variable-length input arguments.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.