Re: proposal: fix corner use case of variadic fuctions usage
От | Vik Reykja |
---|---|
Тема | Re: proposal: fix corner use case of variadic fuctions usage |
Дата | |
Msg-id | CALDgxVuGiPw+WQ-j6kSbGVJEEkqz-Jc-xXLGq9wkkBt=oyJhBw@mail.gmail.com обсуждение исходный текст |
Ответ на | proposal: fix corner use case of variadic fuctions usage (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: fix corner use case of variadic fuctions usage
Re: proposal: fix corner use case of variadic fuctions usage |
Список | pgsql-hackers |
On Sun, Nov 4, 2012 at 12:49 PM, Pavel Stehule <span dir="ltr"><<a href="mailto:pavel.stehule@gmail.com" target="_blank">pavel.stehule@gmail.com</a>></span>wrote:<br /><div class="gmail_extra"><div class="gmail_quote"><blockquoteclass="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello<br/><br /> here is patch, that enables using a variadic parameter modifier for<br/> variadic "any" function.<br /><br /> Motivation for this patch is consistent behave of "format" function,<br />but it fixes behave of all this class variadic functions.<br /><br /> postgres=> -- check pass variadic argument<br/> postgres=> select format('%s, %s', variadic array['Hello','World']);<br /> format<br /> ──────────────<br/> Hello, World<br /> (1 row)<br /><br /> postgres=> -- multidimensional array is supported<br /> postgres=>select format('%s, %s', variadic<br /> array[['Nazdar','Svete'],['Hello','World']]);<br /> format<br/> ───────────────────────────────<br /> {Nazdar,Svete}, {Hello,World}<br /> (1 row)<br /><br /> It respect Tom'scomments - it is based on short-lived FmgrInfo<br /> structures, that are created immediately before function invocation.<br/><br /> Note: there is unsolved issue - reusing transformed arguments - so it<br /> is little bit suboptimalfor VARIADIC RETURNING MultiFuncCall<br /> functions, where we don't need to repeat a unpacking of array value.<br/><br /> Regards<br /><span class=""><font color="#888888"><br /> Pavel</font></span><br /></blockquote></div><br/>Hi Pavel.<br /><br />I am trying to review this patch and on my work computer everything compilesand 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.<br /><br />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.<br /><br />Vik<br /><br />PS: I won'tbe able to answer this thread until Tuesday.<br /><br /></div>
В списке pgsql-hackers по дате отправления: