Declare assorted array functions using anycompatible not anyelement.
Tom Lane <tgl@sss.pgh.pa.us>
Declare assorted array functions using anycompatible not anyelement. Convert array_append, array_prepend, array_cat, array_position, array_positions, array_remove, array_replace, and width_bucket to use anycompatiblearray. This is a simple extension of commit 5c292e6b9 to hit some other places where there's a pretty obvious gain in usability from doing so. Ideally we'd also modify other functions taking multiple old-style polymorphic arguments. But most of the remainder are tied into one or more operator classes, making any such change a much larger can of worms than I desire to open right now. Discussion: https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends.org
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +26 −24 |
| doc/src/sgml/xaggr.sgml | modified | +2 −2 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_operator.dat | modified | +7 −6 |
| src/include/catalog/pg_proc.dat | modified | +26 −14 |
| src/test/regress/expected/arrays.out | modified | +12 −0 |
| src/test/regress/expected/polymorphism.out | modified | +5 −5 |
| src/test/regress/sql/arrays.sql | modified | +2 −0 |
| src/test/regress/sql/polymorphism.sql | modified | +5 −5 |
Documentation touched
Discussion
- Compatible defaults for LEAD/LAG 18 messages · 2020-05-31 → 2020-11-04