Re: Improving PL/Tcl's error context reports

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Improving PL/Tcl's error context reports
Date: 2024-07-05 13:43:21
Message-ID: CAFj8pRBxwHgfWWyJvMrVTiLOvxP88Knhj1NT=M-4rpSk95bK_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

čt 4. 7. 2024 v 21:42 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> I wrote:
> > Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> >> PLpgSQL uses more often function signature
> >> (2024-07-04 19:49:20) postgres=# select bx(0);
> >> ERROR: division by zero
> >> CONTEXT: PL/pgSQL function fx(integer) line 1 at RETURN
> >> PL/pgSQL function bx(integer) line 1 at RETURN
>
> > Oh that's a good idea! So let's use format_procedure(), same as
> > plpgsql does, to generate the final context line that currently
> > reads like
>
> > in PL/Tcl function "bogus"
>
> > Then, we could apply the "pull out just alphanumerics" rule to
> > the result of format_procedure() to generate the internal Tcl name.
> > That should greatly reduce the number of cases where we have duplicate
> > internal names we have to unique-ify.
>
> Here's a v2 that does it like that.
>

I like it.

- patching and compilation without any issue
- check world passed

I'll mark this as ready for commit

Regards

Pavel

> regards, tom lane
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2024-07-05 14:00:00 Re: Use generation memory context for tuplestore.c
Previous Message Frank Streitzig 2024-07-05 13:33:52 XML test error on Arch Linux