Re: [PG19] Bogus errors for polymorphic plpython functions

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PG19] Bogus errors for polymorphic plpython functions
Date: 2026-10-31 04:16:59
Message-ID: CAGRkXqTD1oBQFbUhMKiKvxRzXE1mV+SjAKewqiJvjxH0j7m65A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-31 04:47:02 Re: Proposal: Conflict log history table for Logical Replication
Previous Message shihao zhong 2026-10-31 04:11:17 Re: Fix BRIN numeric_minmax_multi_ops out of range value range merging