plcontainer icon indicating copy to clipboard operation
plcontainer copied to clipboard

ERROR when execute multi-dimensional array of composite types

Open BaiShaoqi opened this issue 6 years ago • 2 comments

Expected behavior


                                composite_type_as_list
 ------------------------------------------------------------------------------------
  {{"(first,1)","(second,1)"},{"(first,2)","(second,2)"},{"(first,3)","(second,3)"}}
 (1 row)

Actual behavior

ERROR: plcontainer: Error receiving data from the client. Maybe retry later. (plcontainer.c:277)

Step to reproduce the behavior

CREATE TYPE type_record AS (
	first text,
	second int4
	) ;

CREATE FUNCTION composite_type_as_list()  RETURNS type_record[] AS $$
# container: plc_python_shared
return [[('first', 1), ('second', 1)], [('first', 2), ('second', 2)], [('first', 3), ('second', 3)]];
$$ LANGUAGE plcontainer;

SELECT * FROM composite_type_as_list();

BaiShaoqi avatar Jun 01 '18 07:06 BaiShaoqi