mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-09 00:17:36 +08:00
Allow PL/Python functions to return void, per gripe from James Robinson
(I didn't use his patch, however). A void-returning PL/Python function must return None (from Python), which is translated into a void datum (and *not* NULL) for Postgres. I also added some regression tests for this functionality.
This commit is contained in:
@ -68,3 +68,8 @@ SELECT join_sequences(sequences) FROM sequences
|
||||
SELECT newline_lf();
|
||||
SELECT newline_cr();
|
||||
SELECT newline_crlf();
|
||||
|
||||
-- Tests for functions returning void
|
||||
SELECT test_void_func1(), test_void_func1() IS NULL AS "is null";
|
||||
SELECT test_void_func2(); -- should fail
|
||||
SELECT test_return_none(), test_return_none() IS NULL AS "is null";
|
||||
|
||||
Reference in New Issue
Block a user