Search Postgresql Archives

Re: Cannot create canonicalization function for user-defined range type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes:
> On Wed, Jan 20, 2021 at 5:00 AM Avery Fischer <biggerfisch@xxxxxxxxx> 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?

> Thus one needs to write a C language function if one wishes to implement a
> custom range.

Yeah, that's the only way at the moment.  We've not seen much use-case
for writing canonicalization functions in PLs, because of (a) performance
and (b) circularity concerns --- the latter meaning that the PL's own
infrastructure is likely to expect that it can manipulate scalar values
without incurring recursion.  These are pretty much the same reasons
why a datatype's I/O functions can't be written in a PL.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux