Re: Issues for named/mixed function notation patch - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Issues for named/mixed function notation patch
Date
Msg-id 162867790909281026s90f434fn4d0d9a78ef4f6fcf@mail.gmail.com
Whole thread Raw
In response to Re: Issues for named/mixed function notation patch  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Issues for named/mixed function notation patch
Re: Issues for named/mixed function notation patch
List pgsql-hackers
2009/9/28 Jeff Davis <pgsql@j-davis.com>:
> On Mon, 2009-09-28 at 18:23 +0200, Pavel Stehule wrote:
>> when I though about control, I found so syntax with mandatory VARIADIC
>> is difficult implementable. So probably the most feasible solution for
>> this moment is to discard a variadic functions from set of functions
>> that are callable with named notation. So I thing we are in tune, and
>> I am going to update patch.
>
> Sounds good. I am looking at the code, and there's a part I don't
> understand:
>
> In FuncnameGetCandidates():
>  /*
>   * Wait with apply proargidxs on args. Detection ambigouos needs
>   * consistent args (based on proargs). Store proargidxs for later
>   * use.
>   */
>   newResult->proargidxs = proargidxs;

>
> But after calling FuncnameGetCandidates (the only place where fargnames
> is non-NIL), you immediately re-assign to best_candidate->args. What
> happens between those two places, and why can't it happen in
> FuncnameGetCandidates?

I am not sure - I have to look to code, but if I remember well, there
are same arrays, with same values, but the field are different order.
One is related to pgproc and second to real params. But I have to
check code again.
>
> Also, you should consistently pass NIL when you mean an empty list, but
> sometimes you pass NULL to FuncnameGetCandidates().

It's bug, where is it?

Regards
Pavel

>
> Regards,
>        Jeff Davis
>
>
>


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: syslog_line_prefix
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] DefaultACLs