there is no array for cstring type. I created it manually in pg_type table. It seems to me that it's working fine. Can this cause any problems? PHP receives data as text. Records are converted to cstring through record_out function. So I just wanted to substitute refcursors/setof records. Can this idea cause any problems?