From: | Vik Reykja <vikreykja(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: fix corner use case of variadic fuctions usage |
Date: | 2012-11-30 10:18:10 |
Message-ID: | CALDgxVuGiPw+WQ-j6kSbGVJEEkqz-Jc-xXLGq9wkkBt=oyJhBw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Sun, Nov 4, 2012 at 12:49 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>wrote:
> Hello
>
> here is patch, that enables using a variadic parameter modifier for
> variadic "any" function.
>
> Motivation for this patch is consistent behave of "format" function,
> but it fixes behave of all this class variadic functions.
>
> postgres=> -- check pass variadic argument
> postgres=> select format('%s, %s', variadic array['Hello','World']);
> format
> ──────────────
> Hello, World
> (1 row)
>
> postgres=> -- multidimensional array is supported
> postgres=> select format('%s, %s', variadic
> array[['Nazdar','Svete'],['Hello','World']]);
> format
> ───────────────────────────────
> {Nazdar,Svete}, {Hello,World}
> (1 row)
>
> It respect Tom's comments - it is based on short-lived FmgrInfo
> structures, that are created immediately before function invocation.
>
> Note: there is unsolved issue - reusing transformed arguments - so it
> is little bit suboptimal for VARIADIC RETURNING MultiFuncCall
> functions, where we don't need to repeat a unpacking of array value.
>
> Regards
>
> Pavel
>
Hi Pavel.
I am trying to review this patch and on my work computer everything
compiles and tests perfectly. However, on my laptop, the regression tests
don't pass with "cache lookup failed for type XYZ" where XYZ is some number
that does not appear to be any type oid.
I don't really know where to go from here. I am asking that other people
try this patch to see if they get errors as well.
Vik
PS: I won't be able to answer this thread until Tuesday.
From | Date | Subject | |
---|---|---|---|
Next Message | AZL . | 2012-11-30 10:25:44 | function |
Previous Message | maxxedev maxxedev | 2012-11-30 09:29:38 | postgres timestamp data errors |
From | Date | Subject | |
---|---|---|---|
Next Message | Ibrar Ahmed | 2012-11-30 10:59:58 | Review: create extension default_full_version |
Previous Message | Pavel Stehule | 2012-11-30 10:15:47 | Re: Review: Extra Daemons / bgworker |