Andres Freund <and...@anarazel.de> writes: > Now that the BF has stabilized, I've rebased and cleaned up the patches I'd > posted earlier. Attached for the first time is my attempt at cleaning up the > docs.
I looked through this quickly, and have a couple of nitpicks. The PGFILEDESC value for jsonb_plpython is worded randomly differently from those for hstore_plpython and ltree_plpython. I think we should make it match those. I also noted a couple of typos in the docs patch. See attached delta patch (I named it .txt in hopes of not confusing the cfbot). I kind of wonder if we still need "46.1. Python 2 vs. Python 3" at all. It certainly doesn't seem like it still deserves its position of honor as the first subsection. Perhaps move it down to be the last subsection? Also, grepping reveals that vcregress.pl still has two stray references to "plpythonu". I did not touch that here, but maybe that has something to do with the ci failure? > I did so far leave in the "major version conflict" detection stuff in > plpy_main.c - that could again be useful? I'm leaning towards removing it, I'd > hope that there's not again such a painful transition, and we have the git > history if needed. I think we should leave it in. I foresee that somebody will want to build plpython2u as an out-of-core extension, at least for a few years yet. If they do, and the core language does not have its half of that guard, it'd be bad. regards, tom lane
diff --git a/contrib/jsonb_plpython/Makefile b/contrib/jsonb_plpython/Makefile index e3f160510d..fea7bdfc00 100644 --- a/contrib/jsonb_plpython/Makefile +++ b/contrib/jsonb_plpython/Makefile @@ -4,7 +4,7 @@ MODULE_big = jsonb_plpython$(python_majorversion) OBJS = \ $(WIN32RES) \ jsonb_plpython.o -PGFILEDESC = "jsonb_plpython - transform between jsonb and plpython3u" +PGFILEDESC = "jsonb_plpython - jsonb transform for plpython" PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpython $(python_includespec) -DPLPYTHON_LIBNAME='"plpython$(python_majorversion)"' diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index b3b16b8a77..c4223fafb6 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -716,7 +716,7 @@ UPDATE table_name SET jsonb_field[1]['a'] = '1'; </para> <para> - The extensions for PL/Python is called <literal>jsonb_plpython3u</literal>. + The extension for PL/Python is called <literal>jsonb_plpython3u</literal>. If you use it, <type>jsonb</type> values are mapped to Python dictionaries, lists, and scalars, as appropriate. </para> diff --git a/doc/src/sgml/ltree.sgml b/doc/src/sgml/ltree.sgml index 4ff384c7ee..508f404ae8 100644 --- a/doc/src/sgml/ltree.sgml +++ b/doc/src/sgml/ltree.sgml @@ -826,15 +826,15 @@ ltreetest=> SELECT ins_label(path,2,'Space') FROM test WHERE path <@ 'Top. <title>Transforms</title> <para> - The <literal>ltree_plpython3u</literal> implement transforms for the - <type>ltree</type> type for PL/Python. If installed and specified when + The <literal>ltree_plpython3u</literal> extension implements transforms for + the <type>ltree</type> type for PL/Python. If installed and specified when creating a function, <type>ltree</type> values are mapped to Python lists. (The reverse is currently not supported, however.) </para> <caution> <para> - It is strongly recommended that the transform extensions be installed in + It is strongly recommended that the transform extension be installed in the same schema as <filename>ltree</filename>. Otherwise there are installation-time security hazards if a transform extension's schema contains objects defined by a hostile user. diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index fab4330cd1..7698d5f068 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -52,7 +52,7 @@ <para> PL/Python supports only Python 3. Past versions of <productname>PostgreSQL</productname> supported Python 2, using the - <literal>plpyhonu</literal> and <literal>plpython2u</literal> language + <literal>plpythonu</literal> and <literal>plpython2u</literal> language names. </para> </sect1>