I am finally trying to move from python2.7 to python 3.x
for both 3.7 and 3.8 I have (attached log):
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
ERROR: incompatible library "/pub/devel/postgresql/prov
a38/postgresql-12.4-1.x86_64/build/tmp_install/usr/lib/postgresql/plpython3.dll":
missing magic block
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
HINT: Extension libraries are required to use the PG_MO
DULE_MAGIC macro.
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE EXTENSION ltree_plpython3u CASCADE;
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
ERROR: language "plpython3u" does not exist
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
HINT: Use CREATE EXTENSION to load the language into th
e database.
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE FUNCTION test1(val ltree) RETURNS int
LANGUAGE plpython3u
TRANSFORM FOR TYPE ltree
AS $$
plpy.info(repr(val))
return len(val)
$$;
Only the python tests fail
$ grep FAIL postgresql-12.4-1-check.log
test python3/hstore_plpython ... FAILED 423 ms
test python3/jsonb_plpython ... FAILED 172 ms
test python3/ltree_plpython ... FAILED 163 ms
never had problem with python2.7
Suggestion ?
Regards
Marco
2020-08-12 18:35:43.891 CEST [10397] LOG: starting PostgreSQL 12.4 on
x86_64-pc-cygwin, compiled by gcc (GCC) 9.3.0, 64-bit
2020-08-12 18:35:43.905 CEST [10397] LOG: listening on Unix socket
"/tmp/pg_regress-RPb7cl/.s.PGSQL.54468"
2020-08-12 18:35:43.987 CEST [10400] LOG: database system was shut down at
2020-08-12 18:35:43 CEST
2020-08-12 18:35:44.017 CEST [10401] [unknown] FATAL: the database system is
starting up
2020-08-12 18:35:44.192 CEST [10397] LOG: database system is ready to accept
connections
2020-08-12 18:35:45.366 CEST [10402] LOG: checkpoint starting: immediate force
wait flush-all
2020-08-12 18:35:45.370 CEST [10402] LOG: checkpoint complete: wrote 3 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.000
s, total=0.004 s; sync files=0, longest=0.000 s, average=0.000 s; distance=1
kB, estimate=1 kB
2020-08-12 18:35:46.503 CEST [10402] LOG: checkpoint starting: immediate force
wait
2020-08-12 18:35:46.507 CEST [10402] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000
s, total=0.003 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0
kB, estimate=1 kB
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
incompatible library
"/pub/devel/postgresql/prova38/postgresql-12.4-1.x86_64/build/tmp_install/usr/lib/postgresql/plpython3.dll":
missing magic block
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython HINT:
Extension libraries are required to use the PG_MODULE_MAGIC macro.
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE EXTENSION ltree_plpython3u CASCADE;
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
language "plpython3u" does not exist
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython HINT:
Use CREATE EXTENSION to load the language into the database.
2020-08-12 18:35:47.433 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE FUNCTION test1(val ltree) RETURNS int
LANGUAGE plpython3u
TRANSFORM FOR TYPE ltree
AS $$
plpy.info(repr(val))
return len(val)
$$;
2020-08-12 18:35:47.434 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
function test1(ltree) does not exist at character 8
2020-08-12 18:35:47.434 CEST [10418] pg_regress/python3/ltree_plpython HINT:
No function matches the given name and argument types. You might need to add
explicit type casts.
2020-08-12 18:35:47.434 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: SELECT test1('aa.bb.cc'::ltree);
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
language "plpython3u" does not exist
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython HINT:
Use CREATE EXTENSION to load the language into the database.
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE FUNCTION test1n(val ltree) RETURNS int
LANGUAGE plpython3u
TRANSFORM FOR TYPE ltree
AS $$
plpy.info(repr(val))
return len(val)
$$;
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
function test1n(ltree) does not exist at character 8
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython HINT:
No function matches the given name and argument types. You might need to add
explicit type casts.
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: SELECT test1n('aa.bb.cc'::ltree);
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
language "plpython3u" does not exist
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython HINT:
Use CREATE EXTENSION to load the language into the database.
2020-08-12 18:35:47.435 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: CREATE FUNCTION test2() RETURNS ltree
LANGUAGE plpython3u
TRANSFORM FOR TYPE ltree
AS $$
return ['foo', 'bar', 'baz']
$$;
2020-08-12 18:35:47.436 CEST [10418] pg_regress/python3/ltree_plpython ERROR:
function test2() does not exist at character 8
2020-08-12 18:35:47.436 CEST [10418] pg_regress/python3/ltree_plpython HINT:
No function matches the given name and argument types. You might need to add
explicit type casts.
2020-08-12 18:35:47.436 CEST [10418] pg_regress/python3/ltree_plpython
STATEMENT: SELECT test2();
2020-08-12 18:35:47.967 CEST [10397] LOG: received fast shutdown request
2020-08-12 18:35:47.969 CEST [10397] LOG: aborting any active transactions
2020-08-12 18:35:48.026 CEST [10397] LOG: background worker "logical
replication launcher" (PID 10407) exited with exit code 1
2020-08-12 18:35:48.026 CEST [10402] LOG: shutting down
2020-08-12 18:35:48.027 CEST [10402] LOG: checkpoint starting: shutdown
immediate
2020-08-12 18:35:48.045 CEST [10402] LOG: checkpoint complete: wrote 110
buffers (0.7%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.015 s,
sync=0.000 s, total=0.018 s; sync files=0, longest=0.000 s, average=0.000 s;
distance=581 kB, estimate=581 kB
2020-08-12 18:35:48.102 CEST [10397] LOG: database system is shut down