PATCH: resolved an issue occured in cast creation

Поиск
Список
Период
Сортировка
От Sanket Mehta
Тема PATCH: resolved an issue occured in cast creation
Дата
Msg-id CA+yw=mOOgm4mAsj+rG2HmyeyVtBroArWN8FWkdrumEqYL9wBOg@mail.gmail.com
обсуждение исходный текст
Ответы Re: PATCH: resolved an issue occured in cast creation  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi,

I have resolved an issue, occurred while creating a new cast.

ISSUE:

While creating a new cast, when user select source type and target type, below query is used to fetch the function list related to that cast.

SELECT proname, nspname 
FROM pg_proc p JOIN pg_namespace n ON n.oid=pronamespace
WHERE proargtypes[0] = <oid of source type>
AND proargtypes[1] = 0 
AND prorettype =  <oid of target type>

In this query "proargtypes" contains argument type list.
As you can see above proargtypes[1] (2nd argument to function ) is compared to 0 (in bold) 

But according to postgresql standard, "proargtypes" field comparison should be like this :

proargtypes[1] (if present) should be compared to 23 (int4),
and proargtypes[2] (if present) should be compared to 16 (bool).

I have resolved the issue and patch is attached with this mail.

Please do review it and let me know in case of anything is missing.

Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
Вложения

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

Предыдущее
От: Surinder Kumar
Дата:
Сообщение: PATCH: NodeAjaxOptionsControl - Empty dropdown not working
Следующее
От: Ashesh Vashi
Дата:
Сообщение: pgAdmin 4 commit: Initialize and parse the neseted schema too.