> if ((ret = SPI_connect()) < 0)
> elog(ERROR, "trigf (fired %s): SPI_connect returned %d", when, ret);
in this page check include in the example. Ithink we need to giveexamplesofonekind.If there is novoidin the code,then there shouldbecheckseverywhere(atleastin the documentation).