<div dir="ltr">Probably you aren't missing anything, I only tested that things built and regressed. </div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 7:19 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Sep 14, 2017 at 06:56:57AM -0700, Paul Ramsey wrote:<br>
> Author: pramsey<br>
> Date: 2017-09-14 06:56:57 -0700 (Thu, 14 Sep 2017)<br>
> New Revision: 15723<br>
><br>
> Modified:<br>
>    trunk/extensions/address_<wbr>standardizer/gamma.c<br>
>    trunk/topology/postgis_<wbr>topology.c<br>
> Log:<br>
> #3847, coverity fixes in topology and address standardizer<br>
><br>
<br>
</span>The change below seems to be calling SPI_prepare on each and every<br>
call (previously it was only called on first invocation).<br>
<div><div class="h5"><br>
> Modified: trunk/topology/postgis_<wbr>topology.c<br>
> ==============================<wbr>==============================<wbr>=======<br>
> --- trunk/topology/postgis_<wbr>topology.c 2017-09-14 13:52:25 UTC (rev 15722)<br>
> +++ trunk/topology/postgis_<wbr>topology.c 2017-09-14 13:56:57 UTC (rev 15723)<br>
> @@ -170,21 +170,19 @@<br>
>    static SPIPlanPtr plan = NULL;<br>
><br>
>    // prepare<br>
> -  if ( ! plan ) {<br>
> -    sql = "SELECT id,srid,precision,null::<wbr>geometry"<br>
> -                          " FROM topology.topology "<br>
> -                          "WHERE name = $1::varchar";<br>
> -    argtypes[0] = CSTRINGOID;<br>
> -    plan = SPI_prepare(sql, 1, argtypes);<br>
> -    if ( ! plan )<br>
> -    {<br>
> -      cberror(be, "unexpected return (%d) from query preparation: %s",<br>
> -              SPI_result, sql);<br>
> -      return NULL;<br>
> -    }<br>
> -    SPI_keepplan(plan);<br>
> -    // SPI_freeplan to free, eventually<br>
> +  sql = "SELECT id,srid,precision,null::<wbr>geometry"<br>
> +                        " FROM topology.topology "<br>
> +                        "WHERE name = $1::varchar";<br>
> +  argtypes[0] = CSTRINGOID;<br>
> +  plan = SPI_prepare(sql, 1, argtypes);<br>
> +  if ( ! plan )<br>
> +  {<br>
> +    cberror(be, "unexpected return (%d) from query preparation: %s",<br>
> +            SPI_result, sql);<br>
> +    return NULL;<br>
>    }<br>
> +  SPI_keepplan(plan);<br>
> +  // SPI_freeplan to free, eventually<br>
><br>
<br>
</div></div>Or am I missing anything ?<br>
<br>
--strk;<br>
<br>
<br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></blockquote></div><br></div>