Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4aad981

Browse files
committed
Doc: fix incorrect example of collecting arguments with fmgr macros.
Thinko in commitf66912b. Back-patch to v10, as that was.Discussion:https://postgr.es/m/154522283371.15419.15167411691473730460@wrigleys.postgresql.org
1 parentd165670 commit4aad981

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎doc/src/sgml/spi.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,14 +4366,15 @@ execq(PG_FUNCTION_ARGS)
43664366
uint64 proc;
43674367

43684368
/* Convert given text object to a C string */
4369-
command = text_to_cstring(PG_GETARG_TEXT_PP(1));
4370-
cnt = PG_GETARG_INT32(2);
4369+
command = text_to_cstring(PG_GETARG_TEXT_PP(0));
4370+
cnt = PG_GETARG_INT32(1);
43714371

43724372
SPI_connect();
43734373

43744374
ret = SPI_exec(command, cnt);
43754375

43764376
proc = SPI_processed;
4377+
43774378
/*
43784379
* If some rows were fetched, print them via elog(INFO).
43794380
*/
@@ -4390,7 +4391,7 @@ execq(PG_FUNCTION_ARGS)
43904391
int i;
43914392

43924393
for (i = 1, buf[0] = 0; i <= tupdesc->natts; i++)
4393-
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %s%s",
4394+
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %s%s",
43944395
SPI_getvalue(tuple, tupdesc, i),
43954396
(i == tupdesc->natts) ? " " : " |");
43964397
elog(INFO, "EXECQ: %s", buf);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp