<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Why do you need it as a native function?  Even if it was it wouldn't be available until PG 15/Postgis 3.3 at the earliest and then you would force everyone to upgrade.  I think this function would work on PG 8.</div><div dir="ltr" class="gmail_attr">Remember PG SQL is Turing complete.  This means anything you want to do can be done in pure SQL. The only benefit of a native function is speed/memory.</div><div dir="ltr" class="gmail_attr">I think a better idea is to add it to the users wiki <a href="https://trac.osgeo.org/postgis/wiki/UsersWikiMain">https://trac.osgeo.org/postgis/wiki/UsersWikiMain</a> and promote that.</div></div></div>