Re: [HACKERS] [PATCH] Generic type subscripting
От | Dmitry Dolgov |
---|---|
Тема | Re: [HACKERS] [PATCH] Generic type subscripting |
Дата | |
Msg-id | CA+q6zcULY8b37PV=G+efOP04UnHksxcJjjKe2OoA+NmrHMupKQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] [PATCH] Generic type subscripting (Arthur Zakirov <a.zakirov@postgrespro.ru>) |
Ответы |
Re: [HACKERS] [PATCH] Generic type subscripting
|
Список | pgsql-hackers |
> On 9 September 2017 at 23:33, Arthur Zakirov <a.zakirov@postgrespro.ru> wrote:
> PostgreSQL and documentation with the patch compiles without any errors. All
> regression tests passed.
Thank you!
> But honestly I still cannot say that I agree with *_extract() and *_assign()
> functions creation way. For example, there is no entry in pg_depend for them
> ...
> =# drop function custom_subscripting_extract(internal);
> =# select data[0] from test_subscripting;
> ERROR: function 0x55deb7911bfd returned NULL
Hm...I never thought about the feature in this way. When I was experimenting I
also tried another approach for this - save to `refevalfunc` a function
pointer to an appropriate function. For simple situations it was ok, but there
were questions about how it would work with node-related functions from
`outfuncs`/`copyfuncs` etc. Another my idea was to find out an actual
`refevalfunc` not at the time of a node creation but later on - this was also
questionable since in this case we need to carry a lot of information with a node
just for this sole purpose. Maybe you can suggest something else?
About dependencies between functions - as far as I understand one cannot create
a `pg_depend` entry or any other kind of dependencies between custom
user-defined functions. So yes, looks like with the current approach the only
solution would be to check in the `_parse` function that `_extract` and
`_assign` functions are existed (which is inconvenient).
> For example, there is no entry in pg_depend
Are there any other disadvantages of this approach?
В списке pgsql-hackers по дате отправления: