Re: Re: proposal: schema variables - Mailing list pgsql-hackers

From jian he
Subject Re: Re: proposal: schema variables
Date
Msg-id CACJufxG6tFo1uOtTPoUw0ntzHddahd7EmR37DhsxMXxUixPaeQ@mail.gmail.com
Whole thread Raw
In response to Re: Re: proposal: schema variables  (jian he <jian.universality@gmail.com>)
Responses Re: Re: proposal: schema variables
List pgsql-hackers
+ /*
+ * The arguments of EXECUTE are evaluated by a direct expression
+ * executor call.  This mode doesn't support session variables yet.
+ * It will be enabled later.
+ */
+ if (pstate->p_hasSessionVariables)
+ elog(ERROR, "session variable cannot be used as an argument");

it should be:
    /*
     * The arguments of CALL statement are evaluated by a direct expression
     * executor call.  This path is unsupported yet, so block it.
     */
    if (pstate->p_hasSessionVariables)
        ereport(ERROR,
                errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                errmsg("session variable cannot be used as an argument"));


similarly, EvaluateParams we can change it to
    /*
     * The arguments of EXECUTE are evaluated by a direct expression
     * executor call.  This mode doesn't support session variables yet.
     * It will be enabled later.
     */
    if (pstate->p_hasSessionVariables)
        ereport(ERROR,
                errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                errmsg("session variable cannot be used as an argument"));

in src/backend/executor/execExpr.c
we don't need
+#include "catalog/pg_variable.h"
?



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: meson: Fix missing name arguments of cc.compiles() calls
Next
From: Paul Jungwirth
Date:
Subject: Re: Index AM API cleanup