Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZdS8-0003Bf-Nk for pgsql-docs@arkaria.postgresql.org; Wed, 19 Dec 2018 15:08:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZdS6-00073c-9j for pgsql-docs@arkaria.postgresql.org; Wed, 19 Dec 2018 15:08:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZdS6-00073V-3z for pgsql-docs@lists.postgresql.org; Wed, 19 Dec 2018 15:08:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZdRz-0000qK-1P for pgsql-docs@lists.postgresql.org; Wed, 19 Dec 2018 15:08:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wBJF7pjC010761; Wed, 19 Dec 2018 10:07:51 -0500 From: Tom Lane To: glauciobb@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Error in example In-reply-to: <154522283371.15419.15167411691473730460@wrigleys.postgresql.org> References: <154522283371.15419.15167411691473730460@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Doc_comments_form?= message dated "Wed, 19 Dec 2018 12:33:53 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10759.1545232071.1@sss.pgh.pa.us> Date: Wed, 19 Dec 2018 10:07:51 -0500 Message-ID: <10760.1545232071@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Doc_comments_form?= writes: > 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); You're right. Will fix, thanks for the report! regards, tom lane