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 1tCivV-00BXkD-Il for pgsql-general@arkaria.postgresql.org; Sun, 17 Nov 2024 17:19:08 +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 1tCivS-000bKG-Jr for pgsql-general@arkaria.postgresql.org; Sun, 17 Nov 2024 17:19:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCivS-000bK7-90 for pgsql-general@lists.postgresql.org; Sun, 17 Nov 2024 17:19:06 +0000 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tCivL-002RTC-Lv for pgsql-general@lists.postgresql.org; Sun, 17 Nov 2024 17:19:06 +0000 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-2967fb53621so150998fac.0 for ; Sun, 17 Nov 2024 09:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731863939; x=1732468739; 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=TDzDYdZiTu0/YJ6fP/rLuilcOQmE4dMM1IpEHNUhm1M=; b=W5mHvnadTMOv/p8WORi7vy2NsiKcyjIxPGH8UNegK1CwAuyp+43odyJ4DuVCxVm7DG tGi2tvnv/J6tEa6JJfdb5ZipFSSXxb4zuVKWiIZdeMvAyLzouCFu3bL0Sd167u/lliiH HesNxgAi+FhHC0yEvCnLgEaoOAswrfpgWVQbFMD7EyR3SnTGx3ldSO7QN8tF2+WqcAi0 P/2U/4S0WHfjZXv/TZ+s9tQLJtc6ifMKX9FNbB+wWTE3QxI3dvpoMbhX5pFfAUWsMeji 5scUxemPRqQZpZ6ICKmxUvTTa8PZ3asYGMP/wuz80eOxOLiG6T6jcD1dZc8q1sloU1iT KeOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731863939; x=1732468739; 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=TDzDYdZiTu0/YJ6fP/rLuilcOQmE4dMM1IpEHNUhm1M=; b=MSUwsE8YTSRqFZLU3T6wEtQNzXbPRccDm3dHF1ZKvRrNnnFKibkNWmwDu9nG/G8ClH Epv6N3HTcMUtY9CpAE3lcbs3LKP1EUbJZ5H+T5sBWHrCUW9R6q9F2Brr3ClxWKysdHEN TwUCoXXcvvyvaH/oEQO7zZLma+bhGV7V49UJCEsBqKtoZlkIHnnIKoidlZv1mOKIKD2r 2tEufbLpVRxvnlGTGiL5IH/YjjyJddymcABx56wxSSRiJFJufeFBxNteis7+tjaCJe68 jDMu1KkJ9zcqlwDHGDd53orLAl4uEcVRhRYH6gusToiFq37xx1mlu5dMKJ9NayFpxgFf fUdQ== X-Forwarded-Encrypted: i=1; AJvYcCWCrVaE/GJf/efcVWJkxFwzIX9VuNo4CB/RV0+Qef/hkFtdJUZZ4IdGWV+Yk55VBwIuY1psHUf/HTBWF0o+@lists.postgresql.org X-Gm-Message-State: AOJu0YySbTmVE4T8FO7wr/QAkyV6EjAeQGqV4DKRFNpojCfbMUvaJrwZ fiaXii3YLbkGE8N+YadJMCAONLsoCqLw4iEoMS4xBPhRIorSQJF4WDTAFGlvLuxhV4MWuhKsSO8 Kbsd61P6oh9FP4vQtNHmhN4eriqU= X-Google-Smtp-Source: AGHT+IGzcIKQGQP/VWOPw/6MHDZEr1fXZi+lxPAVm99QG3mta3m0PTZ67aAaA4ZFtLLoX+4i8JxkS6bQbfT7B1pwL7U= X-Received: by 2002:a05:6870:bb10:b0:296:11e9:b731 with SMTP id 586e51a60fabf-2962ae98797mr6141319fac.8.1731863938766; Sun, 17 Nov 2024 09:18:58 -0800 (PST) MIME-Version: 1.0 References: <40d8beef-ff67-4c6c-828c-2941ca30fdef@cloud.gatewaynet.com> <2757246.1731775878@sss.pgh.pa.us> In-Reply-To: From: "David G. Johnston" Date: Sun, 17 Nov 2024 10:18:22 -0700 Message-ID: Subject: Re: Getting error 42P02, despite query parameter being sent To: Max Ulidtko Cc: Tom Lane , Achilleas Mantzios , Adrian Klaver , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000de9f3606271efecc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000de9f3606271efecc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Nov 17, 2024 at 3:10=E2=80=AFAM Max Ulidtko wro= te: > I assumed that $1 would get substituted *at query time* > The "select" portion of a "create view" query does not get executed during processing of "create view" and it is the "select" execution part of the executor code that performs parameter substitution. IOW, "at query time" never actually happens, the query is only considered as a literal to be parsed. David J. --000000000000de9f3606271efecc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Nov 17, 2024 at 3:10=E2=80=AFAM Max Ulidtko <ulidtko@gmail.com> wrote:<= /div>
= I assumed that $1 would= get substituted *at query time*

The "select" portion of a "create view" query do= es not get executed during processing of "create view" and it is = the "select" execution part of the executor code that performs pa= rameter substitution.=C2=A0 IOW, "at query time" never actually h= appens, the query is only considered as a literal to be parsed.
David J.

--000000000000de9f3606271efecc--