Re: Cannot create canonicalization function for user-defined range type - Mailing list pgsql-general

From David G. Johnston
Subject Re: Cannot create canonicalization function for user-defined range type
Date
Msg-id CAKFQuwbFCY_YHwRBa=wbAygutyBKd2TmGvsLLwXUUyKA8OyLtQ@mail.gmail.com
Whole thread Raw
In response to Cannot create canonicalization function for user-defined range type  (Avery Fischer <biggerfisch@gmail.com>)
Responses Re: Cannot create canonicalization function for user-defined range type
List pgsql-general
On Wed, Jan 20, 2021 at 5:00 AM Avery Fischer <biggerfisch@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.
 

pgsql-general by date:

Previous
From: Avery Fischer
Date:
Subject: Cannot create canonicalization function for user-defined range type
Next
From: Tom Lane
Date:
Subject: Re: Cannot create canonicalization function for user-defined range type