Re: Cannot create canonicalization function for user-defined range type
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Cannot create canonicalization function for user-defined range type |
| Дата | |
| Msg-id | 596023.1611157891@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Cannot create canonicalization function for user-defined range type ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-general |
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> 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?
> 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера