diff options
Diffstat (limited to 'contrib/hstore_plpython/sql')
-rw-r--r-- | contrib/hstore_plpython/sql/hstore_plpython.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/hstore_plpython/sql/hstore_plpython.sql b/contrib/hstore_plpython/sql/hstore_plpython.sql index b6d98b7dd53..1aa4416512a 100644 --- a/contrib/hstore_plpython/sql/hstore_plpython.sql +++ b/contrib/hstore_plpython/sql/hstore_plpython.sql @@ -27,6 +27,17 @@ $$; SELECT test1n('aa=>bb, cc=>NULL'::hstore); +-- test that a non-mapping result is correctly rejected +CREATE FUNCTION test1bad() RETURNS hstore +LANGUAGE plpythonu +TRANSFORM FOR TYPE hstore +AS $$ +return "foo" +$$; + +SELECT test1bad(); + + -- test hstore[] -> python CREATE FUNCTION test1arr(val hstore[]) RETURNS int LANGUAGE plpythonu |