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 1sZTwE-001IyP-CD for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Aug 2024 11:25:42 +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 1sZTwC-008DB7-Nk for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Aug 2024 11:25:40 +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 1sZTwC-008DAy-Af for pgsql-hackers@lists.postgresql.org; Thu, 01 Aug 2024 11:25:40 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sZTw9-002b5E-UY for pgsql-hackers@lists.postgresql.org; Thu, 01 Aug 2024 11:25:39 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-6659e81bc68so60243407b3.0 for ; Thu, 01 Aug 2024 04:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722511536; x=1723116336; 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=WgWrtj1Lq9wzlJMQHIBuikJW0v5t/eRFpyF1AILWIm4=; b=buHI1WOCjOYeF0KS4DeSCoMyT0DybIarpHyFf2d3heTO/IE/RrIGuChcVivFKS0P+G ojnDByGkWMuvAmw416ryJBgueoQx4ALdfqVdqCCi0zNrXBRAi8lDi9aTVoB287vxaP56 g7xcXbHOFYEDWzN795jhBIRBRwUNjyOnMzpG/5ppqmv/+ctIt20piCzyO7GRnBiRbdu+ SOh0lm0YaA1f/l7Tp+pLg2nzWx759BhkVzpZQ8+ApZFB6/nlpgEz8ZMaWzLelrkq5EfT nfuXFZ1d0jDXBa+ipyVpPRoxsF4bqdhFVvd+mR11TDtctoIfe6H+mi6DWqcj/ZUzdTC+ FECA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722511536; x=1723116336; 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=WgWrtj1Lq9wzlJMQHIBuikJW0v5t/eRFpyF1AILWIm4=; b=a5qSC65aMdiD9fnLLwSK/elwY6rzFRYvmtV/aiXpvB347lfq2cv4TzO6Go6JMNy5T0 NZtr56NiY5+MACnB21ETjjwnbRC8CR/Ct+rsZrbANf60CiVQpbqpm/0zTJ5QyJBnop2r 4FUdDkwOGBvwCIH4a70Ogf5CD/E2Jyrq4iyMjRAlKiYRvZNtgqx4EqXeZTsZoGHYrb9F 5WfPdTM1sypmRw4YDr3i+aAsjXgk36j9mfyOpqcQesEfHAVfSAbmfQb7K/jO9JvwabN+ MTmf1WYm2NZYHC3tggDrShqJphi8FLnDPgDVxNvqiTHxzoFUhdNgc0MvVvPKXJDIeYvq fyJA== X-Forwarded-Encrypted: i=1; AJvYcCU1dRN6F0c4SsrNtQRiO0vpnn7cHc7rBm0wzRdWzmAp9pOAV9vJqtOr4jtJfHxjZHtCGZC9t3M+JCbzGOK6emmQj24A0w3vIYOh95nCXsBZGlrb X-Gm-Message-State: AOJu0YxJz8H+ZibhdjszKHuHtfQuo0RVwBdXYdvkjzvU9nLRG3csHdd9 Tgew/kdJbRscnlgeceaGNFlRSfPmnwobxoTFP5f4nVttT9LtfPaZR0rVGO6Jx8JBkWV66ZTFo64 LGiaaaQ3Gh4tKTpp+mVPQ0QqKy24= X-Google-Smtp-Source: AGHT+IEaLx4wUpUeMsBTSj9Ol3DSl7wBRUEitcvj9ZBlOctyvBA5BacuV/QfVJBpH7Zu8kKXtl5WDc7p2iQA7YusHP8= X-Received: by 2002:a05:6902:160b:b0:e08:6787:54b1 with SMTP id 3f1490d57ef6-e0bcd21006dmr2409640276.11.1722511536396; Thu, 01 Aug 2024 04:25:36 -0700 (PDT) MIME-Version: 1.0 References: <20200924035637.GF28585@paquier.xyz> <20201001033824.GC8130@paquier.xyz> <51a9a68e8a998d04df17417d45c1dbd4@xs4all.nl> <89817942c99da01cd5e7850fe418436b@xs4all.nl> <56ca532c37eb0b540961f74a7bd5db39@xs4all.nl> <8181bd3abc647bdae5a4f78e71e62478a98c75f4.camel@cybertec.at> <9e67d49deb18270eddb95e602c83f02b98459843.camel@cybertec.at> <3b662dc5b615d4c20a55e8e2fbe6fc00fe00609d.camel@cybertec.at> <6996931e8c9edf3b82223e74e92326a7ed06c1d6.camel@cybertec.at> <67aa68a7e6dfb44c0cbbdf7f97cadfede4269ce5.camel@cybertec.at> <263ef86d2cc97751e4833d79f3713d4a02b4cfb0.camel@cybertec.at> In-Reply-To: From: Pavel Stehule Date: Thu, 1 Aug 2024 13:24:58 +0200 Message-ID: Subject: Re: proposal: schema variables To: Laurenz Albe Cc: Erik Rijkers , Michael Paquier , Amit Kapila , DUVAL REMI , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000003f9e5e061e9d7854" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003f9e5e061e9d7854 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =C4=8Dt 1. 8. 2024 v 13:22 odes=C3=ADlatel Laurenz Albe napsal: > On Thu, 2024-08-01 at 08:12 +0200, Pavel Stehule wrote: > > fresh rebase + fix format in doc > > Thanks! > > I'm curious, but too lazy to build the patch now, so I'm asking: > what did you do about this error? > I try to investigate this issue now. The patchset is just merging of your work > > CREATE VARIABLE var AS date; > > LET var =3D current_date; > > PREPARE stmt(date) AS SELECT $1; > > EXECUTE stmt(var); > > ERROR: paramid of PARAM_VARIABLE param is out of range > > > Or does a later patch take care of that? > This is a clear bug, and I have to fix it. I hope so I'll do this today > > Yours, > Laurenz Albe > --0000000000003f9e5e061e9d7854 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=C4=8Dt 1. 8. 2024 v=C2=A013:22 odes= =C3=ADlatel Laurenz Albe <la= urenz.albe@cybertec.at> napsal:
On Thu, 2024-08-01 at 08:12 +0200, Pavel Stehule wro= te:
> fresh rebase + fix format in doc

Thanks!

I'm curious, but too lazy to build the patch now, so I'm asking: what did you do about this error?

I try= to investigate this issue now.

The patchset is ju= st merging of your work


> CREATE VARIABLE var AS date;
> LET var =3D current_date;
> PREPARE stmt(date) AS SELECT $1;
> EXECUTE stmt(var);
> ERROR:=C2=A0 paramid of PARAM_VARIABLE param is out of range
=C2=A0

Or does a later patch take care of that?

This is a clear bug, and I have to fix it. I hope so I'll do this tod= ay

=C2=A0

Yours,
Laurenz Albe
--0000000000003f9e5e061e9d7854--