Re: why does plperl cache functions using just a bool for is_trigger
От | Andrew Dunstan |
---|---|
Тема | Re: why does plperl cache functions using just a bool for is_trigger |
Дата | |
Msg-id | 4CC4CE56.7020700@dunslane.net обсуждение исходный текст |
Ответ на | Re: why does plperl cache functions using just a bool for is_trigger (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: why does plperl cache functions using just a bool for is_trigger
|
Список | pgsql-hackers |
<br /><br /> On 10/24/2010 07:50 PM, Tom Lane wrote: <blockquote cite="mid:23157.1287964203@sss.pgh.pa.us" type="cite"><prewrap="">Andrew Dunstan <a class="moz-txt-link-rfc2396E" href="mailto:andrew@dunslane.net"><andrew@dunslane.net></a>writes: </pre><blockquote type="cite"><pre wrap="">On 10/24/2010 06:44 PM, Tom Lane wrote: </pre><blockquote type="cite"><pre wrap="">I'm not certain that plperl is actually correct to do it that way, but that's the basic idea. </pre></blockquote></blockquote><pre wrap=""> </pre><blockquote type="cite"><pre wrap="">Why do we need the is_trigger flag at all for the plperl hash key? At first glance it strikes me as unnecessary. </pre></blockquote><pre wrap=""> We might not. Does the presence or absence of the $_TD hash reference have any impact on what we cache, or what Perl might cache internally? </pre></blockquote><br /> For both trigger and non-trigger functions, we compile this ahead of the user-set function code:<br/><br /><blockquote>our $_TD; local $_TD=shift;<br /></blockquote><br /> Non-trigger functions get passed "undef"to correspond to this invisible argument, while trigger functions get passed the hashref that the trigger callingcode has set up.<br /><br /> cheers<br /><br /> andrew<br /><br /><br /><br />
В списке pgsql-hackers по дате отправления: