mirror of
https://github.com/postgres/postgres.git
synced 2025-12-13 14:22:43 +03:00
Fix plpython to not get totally confused by OUT arguments. (It still doesn't
support multiple OUT arguments, though.) Hannu Krosing
This commit is contained in:
@@ -480,3 +480,16 @@ elif typ == 'obj':
|
||||
return type_record
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
CREATE FUNCTION test_in_out_params(first in text, second out text) AS $$
|
||||
return first + '_in_to_out';
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
-- this doesn't work yet :-(
|
||||
CREATE FUNCTION test_in_out_params_multi(first in text,
|
||||
second out text, third out text) AS $$
|
||||
return first + '_record_in_to_out';
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
CREATE FUNCTION test_inout_params(first inout text) AS $$
|
||||
return first + '_inout';
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
@@ -143,3 +143,8 @@ SELECT * FROM test_type_record_as('obj', 'one', null, false);
|
||||
SELECT * FROM test_type_record_as('obj', null, 2, false);
|
||||
SELECT * FROM test_type_record_as('obj', 'three', 3, false);
|
||||
SELECT * FROM test_type_record_as('obj', null, null, true);
|
||||
|
||||
SELECT * FROM test_in_out_params('test_in');
|
||||
-- this doesn't work yet :-(
|
||||
SELECT * FROM test_in_out_params_multi('test_in');
|
||||
SELECT * FROM test_inout_params('test_in');
|
||||
|
||||
Reference in New Issue
Block a user