On Wed, Jan 20, 2021 at 5:00 AM Avery Fischer <biggerfi...@gmail.com> wrote:
> ERROR: PL/pgSQL functions cannot return type myrange > > Am I misunderstanding the docs, or are they out-of-date, or is something > else going on? How can I create a canonicalization function for my range > type? > In short, I'm pretty sure shell types can only be referenced in C language functions. The allowed types listing for pl/pgsql doesn't mention shell types and this error reinforces the fact that the omission is indeed a reflection of the fact that shell types are not allowed. Thus one needs to write a C language function if one wishes to implement a custom range. David J.