mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-07 11:17:43 +08:00
Add test cases for inline handler of plython2u (when using that language name), and for result object element assignment. There is now at least one test case for every top-level functionality, except plpy.Fatal (annoying to use in regression tests) and result object slice retrieval and slice assignment (which are somewhat broken).
13 lines
506 B
Plaintext
13 lines
506 B
Plaintext
DO $$ plpy.notice("This is plpythonu.") $$ LANGUAGE plpythonu;
|
|
NOTICE: This is plpythonu.
|
|
CONTEXT: PL/Python anonymous code block
|
|
DO $$ plpy.notice("This is plpython2u.") $$ LANGUAGE plpython2u;
|
|
NOTICE: This is plpython2u.
|
|
CONTEXT: PL/Python anonymous code block
|
|
DO $$ nonsense $$ LANGUAGE plpythonu;
|
|
ERROR: NameError: global name 'nonsense' is not defined
|
|
CONTEXT: Traceback (most recent call last):
|
|
PL/Python anonymous code block, line 1, in <module>
|
|
nonsense
|
|
PL/Python anonymous code block
|