mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-13 09:57:02 +08:00
Python 3 support in PL/Python
Behaves more or less unchanged compared to Python 2, but the new language variant is called plpython3u. Documentation describing the naming scheme is included.
This commit is contained in:
@ -1,10 +1,15 @@
|
||||
-- first some tests of basic functionality
|
||||
CREATE LANGUAGE plpython2u;
|
||||
|
||||
-- really stupid function just to get the module loaded
|
||||
CREATE FUNCTION stupid() RETURNS text AS 'return "zarkon"' LANGUAGE plpythonu;
|
||||
|
||||
select stupid();
|
||||
|
||||
-- check 2/3 versioning
|
||||
CREATE FUNCTION stupidn() RETURNS text AS 'return "zarkon"' LANGUAGE plpython2u;
|
||||
|
||||
select stupidn();
|
||||
|
||||
-- test multiple arguments
|
||||
CREATE FUNCTION argument_test_one(u users, a1 text, a2 text) RETURNS text
|
||||
|
||||
Reference in New Issue
Block a user