Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yyl11-0002Cm-15 for pgsql-docs@arkaria.postgresql.org; Sat, 30 May 2015 17:57:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yyl0z-0001we-Rk for pgsql-docs@arkaria.postgresql.org; Sat, 30 May 2015 17:57:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yyl0x-0001wV-TY for pgsql-docs@postgresql.org; Sat, 30 May 2015 17:57:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Yyl0q-0003mV-GK for pgsql-docs@postgresql.org; Sat, 30 May 2015 17:57:42 +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 t4UHvTB2027751; Sat, 30 May 2015 13:57:30 -0400 From: Tom Lane To: Ian Barwick cc: pgsql-docs@postgresql.org Subject: Re: Minor doc correction for SPI_execute_with_args In-reply-to: <55681CBD.8040004@2ndquadrant.com> References: <55681CBD.8040004@2ndquadrant.com> Comments: In-reply-to Ian Barwick message dated "Fri, 29 May 2015 17:01:01 +0900" Date: Sat, 30 May 2015 13:57:29 -0400 Message-ID: <27750.1433008649@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Ian Barwick writes: > The documentation for SPI_execute_with_args: > http://www.postgresql.org/docs/current/static/spi-spi-execute-with-args.html > claims it returns the same value as SPI_execute, whereas it actually > calls SPI_execute_plan which can produce two additional error codes. But SPI_execute also calls _SPI_execute_plan. Moreover, the documented reasons for SPI_execute_plan to return additional error codes don't match up too closely with SPI_execute_with_args (eg, there's no "plan" argument, so saying "plan was prepared with some parameters" is pretty meaningless here). If what you're looking at is the extra error conditions right at the start of SPI_execute_with_args, my inclination would be to document them without any reference to SPI_execute_plan, ie we'd add text much like what's under SPI_execute_plan but with the descriptions of the error codes adjusted to agree with this function. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs