| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Avery Fischer <biggerfisch(at)gmail(dot)com> |
| Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Cannot create canonicalization function for user-defined range type |
| Date: | 2021-01-20 14:41:58 |
| Message-ID: | CAKFQuwbFCY_YHwRBa=wbAygutyBKd2TmGvsLLwXUUyKA8OyLtQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Jan 20, 2021 at 5:00 AM Avery Fischer <biggerfisch(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2021-01-20 15:51:31 | Re: Cannot create canonicalization function for user-defined range type |
| Previous Message | Avery Fischer | 2021-01-20 10:58:43 | Cannot create canonicalization function for user-defined range type |