Error in example
The Post Office <noreply@postgresql.org>
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: glauciobb@gmail.com
Date: 2018-12-19T12:33:53Z
Lists: pgsql-docs
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/10/spi-examples.html
Description:
Dear,
In the example of how to use SPI in the following link
https://www.postgresql.org/docs/10/spi-examples.html
The parameters numbers in the follow lines are wrong.
/ * Convert a text object to a C string * /
command = text_to_cstring (PG_GETARG_TEXT_PP (1));
cnt = PG_GETARG_INT32 (2);
They should be as follow:
/ * Convert a text object to a C string * /
command = text_to_cstring (PG_GETARG_TEXT_PP (0));
cnt = PG_GETARG_INT32 (1);
Best regards,
Gláucio
Commits
-
Doc: fix incorrect example of collecting arguments with fmgr macros.
- 4aad9813e804 10.7 landed
- c9a1c55a8b34 11.2 landed
- 639924249c8a 12.0 landed