mirror of
https://github.com/postgres/postgres.git
synced 2025-12-22 17:42:17 +03:00
plpython: Adjust docs after removal of Python 2 support.
Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de
This commit is contained in:
@@ -349,7 +349,7 @@ COMMENT ON TEXT SEARCH CONFIGURATION my_config IS 'Special word filtering';
|
||||
COMMENT ON TEXT SEARCH DICTIONARY swedish IS 'Snowball stemmer for Swedish language';
|
||||
COMMENT ON TEXT SEARCH PARSER my_parser IS 'Splits text into words';
|
||||
COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer';
|
||||
COMMENT ON TRANSFORM FOR hstore LANGUAGE plpythonu IS 'Transform between hstore and Python dict';
|
||||
COMMENT ON TRANSFORM FOR hstore LANGUAGE plpython3u IS 'Transform between hstore and Python dict';
|
||||
COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI';
|
||||
COMMENT ON TYPE complex IS 'Complex number data type';
|
||||
COMMENT ON VIEW my_view IS 'View of departmental costs';
|
||||
|
||||
@@ -156,11 +156,11 @@ CREATE [ OR REPLACE ] TRANSFORM FOR <replaceable>type_name</replaceable> LANGUAG
|
||||
|
||||
<para>
|
||||
To create a transform for type <type>hstore</type> and language
|
||||
<literal>plpythonu</literal>, first set up the type and the language:
|
||||
<literal>plpython3u</literal>, first set up the type and the language:
|
||||
<programlisting>
|
||||
CREATE TYPE hstore ...;
|
||||
|
||||
CREATE EXTENSION plpythonu;
|
||||
CREATE EXTENSION plpython3u;
|
||||
</programlisting>
|
||||
Then create the necessary functions:
|
||||
<programlisting>
|
||||
@@ -174,7 +174,7 @@ AS ...;
|
||||
</programlisting>
|
||||
And finally create the transform to connect them all together:
|
||||
<programlisting>
|
||||
CREATE TRANSFORM FOR hstore LANGUAGE plpythonu (
|
||||
CREATE TRANSFORM FOR hstore LANGUAGE plpython3u (
|
||||
FROM SQL WITH FUNCTION hstore_to_plpython(internal),
|
||||
TO SQL WITH FUNCTION plpython_to_hstore(internal)
|
||||
);
|
||||
|
||||
@@ -101,9 +101,9 @@ DROP TRANSFORM [ IF EXISTS ] FOR <replaceable>type_name</replaceable> LANGUAGE <
|
||||
|
||||
<para>
|
||||
To drop the transform for type <type>hstore</type> and language
|
||||
<literal>plpythonu</literal>:
|
||||
<literal>plpython3u</literal>:
|
||||
<programlisting>
|
||||
DROP TRANSFORM FOR hstore LANGUAGE plpythonu;
|
||||
DROP TRANSFORM FOR hstore LANGUAGE plpython3u;
|
||||
</programlisting></para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user