Re: [HACKERS] [PATCH] Generic type subscripting

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: [HACKERS] [PATCH] Generic type subscripting
Дата
Msg-id CA+q6zcWSFL2x3j4XPWcCFDG1PtSg815gnwbCGpC5kidoHwjF0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] Generic type subscripting  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Ответы Re: [HACKERS] [PATCH] Generic type subscripting  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Список pgsql-hackers
> On 17 September 2017 at 00:04, Arthur Zakirov <a.zakirov@postgrespro.ru> wrote:
>
> In my opinion, 'DEPENDS ON' syntax is not actually appropriate here. It
> also looks like a not very good hack to me.

Hm...why do you think about it as a hack?

> Moreover user can implement subscripting to its own type without using
> 'DEPENDS ON' syntax. And he will face the bug mentioned above too.

Yes, but since it will require from a user to create few independent custom
functions for subscripting (as we discussed before, there were few reasons of
having them as a proper separate function), I don't see how to avoid this step
of explicitly marking all of them as related to a subscripting logic for
particular data type. And therefore it's possible to forget to do that step in
spite of what form this step will be. Maybe it's possible to make something
like `CREATE FUNCTION ... FOR SUBSCRIPTING`, then verify that assign/extract
functions are presented and notify user if he missed them (but I would rather
not do this unless it's really necessary, since it looks like an overkill).

But I'm open to any suggestions, do you have something in mind?

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Arthur Zakirov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Generic type subscripting
Следующее
От: Peter Geoghegan
Дата:
Сообщение: [HACKERS] ICU locales and text/char(n) SortSupport on Windows