Re: [HACKERS] [PATCH] Generic type subscripting

Поиск
Список
Период
Сортировка
Искать
От
Dmitry Dolgov
Тема
Re: [HACKERS] [PATCH] Generic type subscripting
Дата
Msg-id
20201130113454.ohb6oho4fvwtpz3t@localhost
Ответ на
Список
Дерево обсуждения
[HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] [PATCH] Generic type subscripting David Steele <david@pgmasters.net>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting David Steele <david@pgmasters.net>
Re: [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] [PATCH] Generic type subscripting Oleg Bartunov <obartunov@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [PATCH] Generic type subscripting Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] [PATCH] Generic type subscripting Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] [PATCH] Generic type subscripting Tom Lane <tgl@sss.pgh.pa.us>
> On Fri, Nov 27, 2020 at 12:13:48PM +0300, Alexander Korotkov wrote:
>
> Hi!
>
> I've started to review this patch.

Thanks!

> My first question is whether we're
> able to handle different subscript types differently.  For instance,
> one day we could handle jsonpath subscripts for jsonb.  And for sure,
> jsonpath subscripts are expected to be handled differently from text
> subscripts.  I see we can distinguish types during in prepare and
> validate functions.  But it seems there is no type information in
> fetch and assign functions.  Should we add something like this to the
> SubscriptingRefState for future usage?
>
> Datum uppertypeoid[MAX_SUBSCRIPT_DEPTH];
> Datum lowertypeoid[MAX_SUBSCRIPT_DEPTH];

Yes, makes sense. My original idea was that it could be done within the
jsonpath support patch itself, but at the same time providing these
fields into SubscriptingRefState will help other potential extensions.

Having said that, maybe it would be even better to introduce a field
with an opaque structure for both SubscriptingRefState and
SubscriptingRef, where every implementation of custom subscripting can
store any necessary information? In case of jsonpath it could keep type
information acquired in prepare function, which would be then passed via
SubscriptingRefState down to the fetch/assign.


В списке pgsql-hackers по дате отправления
От: Yulin PEI
Дата:
От: Fabien COELHO
Дата:
FAQ