Re: PATCH: resolved an issue occured in cast creation

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Sanket Mehta <sanket(dot)mehta(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: resolved an issue occured in cast creation
Date: 2016-01-19 13:42:08
Message-ID: CA+OCxox1zL9G8-dMGhZpcfMSm0nhiw8DsiB8-5DT_13MyzN5RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks - patch applied.

On Tue, Jan 19, 2016 at 11:46 AM, Sanket Mehta
<sanket(dot)mehta(at)enterprisedb(dot)com> wrote:
> 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
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-01-19 13:50:39 pgAdmin 4 commit: Setting a missing parameter - 'empty_value' in NodeAj
Previous Message Dave Page 2016-01-19 13:41:52 pgAdmin III commit: Fix selection of cast functions in the Cast dialogu