Re: Using Expanded Objects other than Arrays from plpgsql

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
Date: 2025-02-03 09:19:09
Message-ID: 932C9840-63D6-469D-9C65-1B1A14594D29@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> On 3 Feb 2025, at 02:56, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I decided to see what would happen if we tried to avoid the code
> duplication in pl_funcs.c by making some "walker" infrastructure
> akin to expression_tree_walker. While that doesn't seem useful
> for the dump_xxx functions, it works very nicely for the free_xxx
> functions and now for the mark_xxx ones as well. pl_funcs.c
> nets out about 400 lines shorter than in the v4 patch. The
> code coverage score for the file is still awful :-(, but that's
> because we're not testing the dump_xxx functions at all.
>
> PFA v5. The new 0001 patch refactors the free_xxx infrastructure
> to create plpgsql_statement_tree_walker(), and then in what's now
> 0003 we can use that instead of writing a lot of duplicate code.

Pre-preliminary refactoring looks good to me, as the rest of the patch set.

(Well, maybe paramarg2 resonates a bit, just from similarity with varchar2)

ecpg tests seem to fail on Windows[0], but looks like it's not related to this thread.

Best regards, Andrey Borodin.

[0] https://cirrus-ci.com/task/4835794898124800

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zwettler Markus (OIZ) 2025-02-03 10:14:18 Re: Re: could not accept ssl connection tlsv1 alert unknown ca
Previous Message Zwettler Markus (OIZ) 2025-02-03 08:37:29 Re: Re: could not accept ssl connection tlsv1 alert unknown ca

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-02-03 09:25:05 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message jian he 2025-02-03 09:14:06 Re: Non-text mode for pg_dumpall