Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftGSu-0005uo-1T for pgsql-docs@arkaria.postgresql.org; Fri, 24 Aug 2018 18:05:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftGSp-0005Xb-Hj for pgsql-docs@arkaria.postgresql.org; Fri, 24 Aug 2018 18:05:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftGSp-0005XU-4r for pgsql-docs@lists.postgresql.org; Fri, 24 Aug 2018 18:05:39 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ftGSa-0004un-At for pgsql-docs@lists.postgresql.org; Fri, 24 Aug 2018 18:05:37 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1ftGSZ-0005wQ-HL; Fri, 24 Aug 2018 14:05:23 -0400 Date: Fri, 24 Aug 2018 14:05:23 -0400 From: Bruce Momjian To: abgans+postgres@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Global dict name is listed inconsistently Message-ID: <20180824180523.GA18798@momjian.us> References: <153484305538.1370.7605856225879294548@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <153484305538.1370.7605856225879294548@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 21, 2018 at 09:17:35AM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/10/static/plpython-sharing.html > Description: > > Page https://www.postgresql.org/docs/10/static/plpython-sharing.html says: > "The global dictionary SD is available to store data between function > calls." few lines lower it says: "global data and function arguments from > myfunc are not available to myfunc2. The exception is the data in the GD > dictionary, as mentioned above." Note that the global dictionary is named > "SD" in the first quote and "GD" in the second one. > > Please correct either first or second sentence. Well, the documentation is correct, but obviously not clear. I have the attached patch which modifies the documentation and clarifies this issue. Does it help you? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + --uAKRQypu60I7Lcqm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="plpython.diff" diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml new file mode 100644 index d086ddf..60a5907 *** a/doc/src/sgml/plpython.sgml --- b/doc/src/sgml/plpython.sgml *************** SELECT * FROM multiout_simple_setof(3); *** 768,776 **** Sharing Data The global dictionary SD is available to store ! data between function calls. This variable is private static data. The global dictionary GD is public data, ! available to all Python functions within a session. Use with care.global data in PL/Python --- 768,776 ---- Sharing Data The global dictionary SD is available to store ! private data between repeated calls to the same function. The global dictionary GD is public data, ! that is available to all Python functions within a session; use with care.global data in PL/Python --uAKRQypu60I7Lcqm--