Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tUTDj-000DDG-4x for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Jan 2025 16:11:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tUTDi-001YZd-LT for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Jan 2025 16:11:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tUTDi-001YZT-9w for pgsql-hackers@lists.postgresql.org; Sun, 05 Jan 2025 16:11:18 +0000 Received: from mail-vs1-xe36.google.com ([2607:f8b0:4864:20::e36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tUTDf-0000q9-3B for pgsql-hackers@lists.postgresql.org; Sun, 05 Jan 2025 16:11:17 +0000 Received: by mail-vs1-xe36.google.com with SMTP id ada2fe7eead31-4afe2a1849bso7919073137.3 for ; Sun, 05 Jan 2025 08:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736093475; x=1736698275; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=G46xJU3A/Z7DsAOI7O7bkuD4ip/aaZPfcvq18233DH4=; b=fzlqvTvdEvbPsG+3zXNHE8FARpCqXJ+u6oCdL18w+G2j7H3PtRHm2E2kYZLIrOi73O kJJXhRTwHnRbkM3+JiEe9JzCCcjAUV1LhGgwKjTFwM2VkmJT70NMKighaHr2qRzaLpa/ MU5isn4zarbdPGGDktrV8F08lTLi61dIN90yUjItawqHrvguCoxCrbqIODv1WvP5Proe sdJi8vzXT2S4/njgo8h85hcgITVOQ8pB8LsIknkrrhBU2UdaGJ057L5L4uNrBkqVz51p mZR/hkv03okoJ26gAYfkKIgsyqvDJcauqBRCPZUy7WrlfO3r8FGdVQX6GPShZ76UqNBq /dXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736093475; x=1736698275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G46xJU3A/Z7DsAOI7O7bkuD4ip/aaZPfcvq18233DH4=; b=HXaV5icoDOkqIg1TMD80OJYL98f6T3uCZriSMkVWYZAuGNxQfuAC4MnYoXUQgtXJyo Aw/LTSo9lDw5U6CqWwf8nujUWTTxkedK+XJZKgPx9Cp9cB4ZLdnZXtbRJ+PYscHLQKcR vIHcIcq0xLj7Kb0sr1BMh1pHDwjjyIW8RMFq1VTjRlT5TQo9D15/AF3kJ+unszc4p2lq G59BGeDmJlR/perg5ydNoytaGcRuvYASkgzosKVYhUug3IYtOp7tc/3G2un1go/IVHxE JC1dRJXP9LuA1NlYQjg1SYx9gdsvDz7v0vmgnPm3NHppg7sC6Ch6ECg8nQBBLD7bBMnM TAqA== X-Forwarded-Encrypted: i=1; AJvYcCULihSGOnkf1Zw/I+9tUOpXws36qATKYp4nrXhPzhQ/zdtzXNOGC5ZHAKlXKbp7oHCE7iEb3WxOySEZ5a8V@lists.postgresql.org X-Gm-Message-State: AOJu0YytzNBcRdXWEv6dxbbels54Qeszl7FtA8so8FIoNVFYkbbngun5 tfZTYRQ9V4kgj4azxRtpDf0m5KBjun4i9XO6fyp482nuDEElieGYVuO8NtngS/dLsjzOL0lqo0T zOTMQnz1iEFtLz+plTjTw6O0plWfTA75dYPU= X-Gm-Gg: ASbGncsDUvNuDv7sGr/ROk4bBIwESp/naQO/c+nc+Yk9yGkfs+U7GXDYt4iglaI9/aB AvhsNr1fZQRVbS3hT0gkEGV1yblHYkyoc5Y/a X-Google-Smtp-Source: AGHT+IFekSLu04rizBDtEa/r91GFja5eNU7oDL6dBeJpvSLrBB7kxawbuy0idjan56JxQW6OKgYH7CtD9IEbOoTeg+Y= X-Received: by 2002:a05:6102:26c8:b0:4b1:16f8:efcb with SMTP id ada2fe7eead31-4b2cc44cb38mr46007480137.17.1736093475069; Sun, 05 Jan 2025 08:11:15 -0800 (PST) MIME-Version: 1.0 References: <3chredgnjcmccym2kczawfih226b4ac6co7p6z4jeofevrcosi@mrsxkx2x2c65> <20241120201313.t4wbhld4ktgielaf@erthalion.local> In-Reply-To: From: jian he Date: Mon, 6 Jan 2025 00:10:37 +0800 Message-ID: Subject: Re: Re: proposal: schema variables To: Pavel Stehule Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Laurenz Albe , Erik Rijkers , Michael Paquier , Amit Kapila , DUVAL REMI , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk + /* + * 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" ?