I noticed one in the SPI docs and tried to look for more. The attached patch is an attempt at removing the remaining references. The original SPI example returned a uint64 as a signed int8 SQL type, so I'm not sure if I handled that correctly.
However, I didn't touch the documentation of the configure options for --disable-floatN-byval, since this thread proposed something a bit more invasive: https://www.postgresql.org/message-id/flat/10862.1519228208%40sss.pgh.pa.us#10862.1519228...@sss.pgh.pa.us -John Naylor
diff --git a/doc/src/sgml/plhandler.sgml b/doc/src/sgml/plhandler.sgml index 363f84b..4f8c4d0 100644 --- a/doc/src/sgml/plhandler.sgml +++ b/doc/src/sgml/plhandler.sgml @@ -11,9 +11,8 @@ <para> All calls to functions that are written in a language other than the current <quote>version 1</quote> interface for compiled - languages (this includes functions in user-defined procedural languages, - functions written in SQL, and functions using the version 0 compiled - language interface) go through a <firstterm>call handler</firstterm> + languages (this includes functions in user-defined procedural languages + and functions written in SQL) go through a <firstterm>call handler</firstterm> function for the specific language. It is the responsibility of the call handler to execute the function in a meaningful way, such as by interpreting the supplied source text. This chapter outlines diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml index 0bac342..1260275 100644 --- a/doc/src/sgml/spi.sgml +++ b/doc/src/sgml/spi.sgml @@ -4583,17 +4583,19 @@ INSERT INTO a SELECT * FROM a; PG_MODULE_MAGIC; -int64 execq(text *sql, int cnt); +PG_FUNCTION_INFO_V1(execq); -int64 -execq(text *sql, int cnt) +Datum +execq(PG_FUNCTION_ARGS) { char *command; + int cnt; int ret; uint64 proc; /* Convert given text object to a C string */ - command = text_to_cstring(sql); + command = text_to_cstring(PG_GETARG_TEXT_PP(1)); + cnt = PG_GETARG_INT32(2); SPI_connect(); @@ -4626,17 +4628,11 @@ execq(text *sql, int cnt) SPI_finish(); pfree(command); - return proc; + PG_RETURN_INT64(proc); } </programlisting> <para> - (This function uses call convention version 0, to make the example - easier to understand. In real applications you should use the new - version 1 interface.) - </para> - - <para> This is how you declare the function after having compiled it into a shared library (details are in <xref linkend="dfunc"/>.):