| From: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Борис Мурашов <murasovb(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19906: Backend crash (signal 11) creating a LANGUAGE sql function that returns a composite type from a sub- |
| Date: | 2026-11-17 01:45:04 |
| Message-ID: | CAJTYsWU_eHpULkHVOpAMz39y=96hffgud4nExWpj0xL6cEgt5Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
On Tue, 17 Nov 2026 at 04:16, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> =?UTF-8?B?0JHQvtGA0LjRgSDQnNGD0YDQsNGI0L7Qsg==?= <murasovb(at)gmail(dot)com> writes:
> > One request from the user side: the new error "cannot cast type record to
> > t" does not help much here. The function body looks correct, and the same
> > query works as a plain SELECT, so it is not clear what to change. Is it
> > possible to add an errhint() that tells the user to cast the row
> > explicitly, for example "Cast the row value to type t explicitly"? This
> > hint shows users the s::t workaround at once.
>
> Okay, more or less as attached then.
Thanks, LGTM. Tested the cases from the report, both at create time
and at call time with check_function_bodies = off, all of them give
the error with the hint now.
Post your last mail, I was auditing the places that need these comment
updates, and the difference between that list and your patch is:
1) make_fn_arguments() in parse_func.c still has the old comment, and
clauses.c calls it with NULL.
2) make_row_comparison_op() in parse_expr.c has it too, but it
dereferences pstate anyway, so that line can just go?
Regards,
Ayush
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-11-17 02:10:05 | Re: Lost FOR KEY SHARE lock |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-11-17 01:42:34 | RE: BUG #18754: Logical replication cannot restart if client sent a copyDone |