public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrey Borodin <[email protected]>
To: Tom Lane <[email protected]>
Cc: Pavel Borisov <[email protected]>
Cc: Michel Pelletier <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: [email protected]
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
Date: Mon, 3 Feb 2025 22:57:27 +0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CACxu=vJaKFNsYxooSnW1wEgsAO5u_v1XYBacfVJ14wgJV_PYeg@mail.gmail.com>
<[email protected]>
<CACxu=vLXvpzN4X3k+9jsMt6ujuOvFVUSkA80t_cROSsF4y2jQQ@mail.gmail.com>
<[email protected]>
<CACxu=vKEF8Qa-OaADFxf0uMg-xw6gH_CNCWd2s+xaqh-gY4=xg@mail.gmail.com>
<[email protected]>
<[email protected]>
<CACxu=v++HNmss59yGUDkRny7g=M8tZ2YXF07AUXqKVGqcSfxGQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<CACxu=v+dn37zr8gx5xNP-EZY3OLtGLTHrbx_ZkCQc40HpyMLKA@mail.gmail.com>
<[email protected]>
<CACxu=vL7i_U_iSNpREe8eCAMEyKHuPpk9THRpBhk+ar0U1EdOw@mail.gmail.com>
<CACxu=vKLc6f5N8_DR58LKkE1eohWSxTvThTeGsLm7p7QH1aFBA@mail.gmail.com>
<CACxu=vJf2S=ysun_h=zmYNu6oUM47+egbpX5mMC0X9BJK=EQwQ@mail.gmail.com>
<CACxu=vK+S6BXN8ZYyBvqQBWrcwHXqtue1-ZuKO3+XtHGBYcDUQ@mail.gmail.com>
<CAFj8pRCd6xcH-AYEyHFdGdU89O9JjZ-v-pyQnOwd9zNJkCEdhQ@mail.gmail.com>
<[email protected]>
<CACxu=! ! ! [email protected]>
<[email protected]>
<CACxu=vKModwqSpEjpn-ur1uMAEYkcd-i8CvNsH-z9=dk7F7YQw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CALT9ZEGy5+GNQUtR80BPL7k-Qi47sqwPLnN_dOaQUW5UbxcTGA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
> On 3 Feb 2025, at 22:36, Tom Lane <[email protected]> wrote:
>
> I'm not wedded to that name; do you have a better idea?
I'd propose something like attached. But feel free to ignore my suggestion: I do not understand context of these structure members.
Best regards, Andrey Borodin.
Attachments:
[application/octet-stream] rename.diff (1.8K, 2-rename.diff)
download | inline diff:
diff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.h
index 191d8fe34d..594cdc2bcb 100644
--- a/src/include/executor/execExpr.h
+++ b/src/include/executor/execExpr.h
@@ -424,8 +424,8 @@ typedef struct ExprEvalStep
struct
{
ExecEvalSubroutine paramfunc; /* add-on evaluation subroutine */
- void *paramarg; /* private data for same */
- void *paramarg2; /* more private data for same */
+ void *exprarg; /* private data for PLpgSQL_expr* */
+ void *paramarg; /* more private data for Param* */
int paramid; /* numeric ID for parameter */
Oid paramtype; /* OID of parameter's datatype */
} cparam;
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index d4377ceecb..ddc8e511cc 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -6505,8 +6505,8 @@ plpgsql_param_compile(ParamListInfo params, Param *param,
* pointers to the PLpgSQL_expr as well as this specific Param, to support
* plpgsql_param_eval_var_check().
*/
- scratch.d.cparam.paramarg = expr;
- scratch.d.cparam.paramarg2 = param;
+ scratch.d.cparam.exprarg = expr;
+ scratch.d.cparam.paramarg = param;
scratch.d.cparam.paramid = param->paramid;
scratch.d.cparam.paramtype = param->paramtype;
ExprEvalPushStep(state, &scratch);
@@ -6550,8 +6550,8 @@ plpgsql_param_eval_var_check(ExprState *state, ExprEvalStep *op,
if (!var->isnull &&
VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(var->value)))
{
- PLpgSQL_expr *expr = (PLpgSQL_expr *) op->d.cparam.paramarg;
- Param *param = (Param *) op->d.cparam.paramarg2;
+ PLpgSQL_expr *expr = (PLpgSQL_expr *) op->d.cparam.exprarg;
+ Param *param = (Param *) op->d.cparam.paramarg;
/*
* We might have already figured this out while evaluating some other
view thread (34+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox