Hi Tom,

Did a quick test, I think it worked on master

SQL:

CREATE FUNCTION r3(OUT r record)
AS $$ return (1, 2) $$ LANGUAGE plpython3u;

SELECT * FROM r3() AS (a int, b int);
SELECT * FROM r3();

master:
CREATE FUNCTION
SELECT * FROM r3() AS (a int, b int);
 a | b
---+---
 1 | 2
(1 row)

SELECT * FROM r3();
ERROR:  a column definition list is required for functions returning
"record"

with patch:
CREATE FUNCTION r3(OUT r record)
ERROR:  PL/Python functions cannot return type record
SELECT * FROM r3() AS (a int, b int);
ERROR:  function r3() does not exist

Thanks,
Shihao

Reply via email to