Re: SPI_connect, SPI_connect_ext return type - Mailing list pgsql-hackers

From Stepan Neretin
Subject Re: SPI_connect, SPI_connect_ext return type
Date
Msg-id CAMaYL5Yb=3uPOQm2gufqqSDed9Z13Ow0_NhVW1MXyoEwgrmfSQ@mail.gmail.com
Whole thread Raw
In response to Re: SPI_connect, SPI_connect_ext return type  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers

> I'd give it decent odds since our example usage doesn't include the test.

> /* connect to SPI manager */
>    if ((ret = SPI_connect()) < 0)
>        elog(ERROR, "trigf (fired %s): SPI_connect returned %d", when, ret);


in this page check include in the example.
I think we need to give examples of one kind. If there is no void in the code, then there should be checks everywhere (at least in the documentation).
 What do you think about the attached patch? 
Best Regards, Stepan Neretin.

Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: is_superuser versus set_config_option's parallelism check
Next
From: Tom Lane
Date:
Subject: Re: is_superuser versus set_config_option's parallelism check