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 1tIq3y-00GyMb-LP for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2024 14:09:11 +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 1tIq3v-00HW2E-Gh for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2024 14:09:08 +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 1tIq3u-00HW26-Up for pgsql-hackers@lists.postgresql.org; Wed, 04 Dec 2024 14:09:08 +0000 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tIq3s-00115m-Vl for pgsql-hackers@postgresql.org; Wed, 04 Dec 2024 14:09:06 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-466966d8dbaso53272941cf.3 for ; Wed, 04 Dec 2024 06:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1733321342; x=1733926142; darn=postgresql.org; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=4M9XeV5eJYGEJH62lC5DumglwMpq/CCOJOu55M3+RxE=; b=0xijem421MpXzyclPVk6D2c+KONXZtVOu379wC0EEVWq39+GlGsBS1wu85uXXoGDqC DTERUhHzS61dWfPV/8IFGFE/EvlPaqso0xYElxRWiVkzK7av4NiNu8BUn3Vvtdjf7kP8 /IoT4q9dBCHVtBLACJ3hZBugOV3eLA6FDL09zz1JdXl0fVauRaJibKvhlCibh594GJUg 4nJAgZuU1HegYtq8Kce6eGOvDHpN3NKtchn9J+z4GmB+66BFaTrxtr1JH7OQE4Mj5cr6 YOGx5mgLQZqpoT5NYyw1uEr+qQ4CZy3bKQJMy5n66Rmemv5+I1I+S0d3y0iH9aYoOBFC CzNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733321342; x=1733926142; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4M9XeV5eJYGEJH62lC5DumglwMpq/CCOJOu55M3+RxE=; b=hJ187aHhdcLZL+HwkgJF0HRnSrHHBxF3y5chRHwH1Ai5hZ5kWLRNXbc2wmw4r+sY4U mpeFICLZ0aUEhaycL1s7uzX0KMz1f4INwWOOom0NeyCy98bdGtyVmn0TI75DheAO47Ts hIFDTVgUXD0gS2/rMeIVvftBH+VA22TByxykBhYkIfQgb09K9ow6Im3W3xjjj/AC55RR 0kTbThxYY98tlYqnZqGOL4d9nJgyLKmDieKbEIr3Bxyr2lzBKmxXr+aZP6O7bnmP4zFG N1yeULEfk0kdUszootbs6sD0xsW1orvRwJAGsy6GtaMxG9dyrKseSt8zvu4/Sr1lsAvo bWCg== X-Forwarded-Encrypted: i=1; AJvYcCX2FG8uY12kQIQyA8yDwpi2AbD8/F2Esm3PlVOTZywd6BVSxDjLSNM4zwGYfvXMym9AMzURzDpauuQkLnlF@postgresql.org X-Gm-Message-State: AOJu0YwGLiOMdAd471PARiofNE0n7c5WVGEzvvJM3zT16MsnkPALgOQ/ 5ekwEVjKQElICqVeAo6sztuivhwC/9NJiNxmWGOEOjZ5Od2Z2Wzmv/bJGur26lQ= X-Gm-Gg: ASbGncuEorWfoczuOHCu4Llu0vGaU1Upg6JpdP96Of4ajH2EojtYrwv3aW9HbzsngQ0 rluZZhyMucdonrGCKhQF2ASG3uX5EY7MK0swNvpyBX/fEwndTFDPYI51gN5hQMZB8dEn25GvOvH E9XQ7HW2a1qi6ck+wz9o9dYh1Cldya6N1NqKKTrKtF1Tn07wZIHxlopOyDS5YMzWZgcJe0LNm++ iUtO+IhLYWy3KX64pG6d99729L+TuZwoNDFCzpRIpDOv+hWcU7FKLUo30nq X-Google-Smtp-Source: AGHT+IHgdg30XBu/FMvWssi0gs0Ze5KbrbnjSZ0ZC7/MixRuF1pKR9dmhPDpLqrTWTPUZ3mxChR8kA== X-Received: by 2002:ac8:7d86:0:b0:463:59fc:db8a with SMTP id d75a77b69052e-4670c3dbd52mr89884761cf.53.1733321341476; Wed, 04 Dec 2024 06:09:01 -0800 (PST) Received: from ?IPV6:2605:a601:a681:6b00::2bb? ([2605:a601:a681:6b00::2bb]) by smtp.googlemail.com with ESMTPSA id d75a77b69052e-466c4054955sm73837851cf.1.2024.12.04.06.09.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Dec 2024 06:09:00 -0800 (PST) Content-Type: multipart/alternative; boundary="------------wHUkAf5af4l4Tx2pRmmXvaAY" Message-ID: Date: Wed, 4 Dec 2024 09:08:53 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Guidance Needed for Testing PostgreSQL Patch (CF-5044) To: postgresql_contributors , "pgsql-hackers@postgresql.org" Cc: Kiran Suresh Kulkarni , Hari Prasad B References: From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/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QUCZFlx 5wUJGVGAjgAKCRCZ+n/LWfw7gf+iB/4g8CPY5jihf5r/8EsoIGe2H+dpVmpPF8YGBzTIvCz/ fQoOq8AX/pE76QEuFnFZWfjw+wgBXgCVmkox2Eflkk6z4ND3pcwGZ6CfCxTQCDk/dij+2DQ4 6bmDCy/sBgcbz9mTpoLC11HLoPae6YN9nBNQRZDcEFEu54OaVOqlIdbA6m+POIBCXZdHOFc0 WoDTgxHRzC1jgQNidyd6tKqcsVJs0dzF0oKTmFFmUAqTdJO12LBuNA1rlqrR3EtpYk8B/wtS 5dIMD7Q8hwQpL+4C6GNpb6ZKnPkLi47pDOLhz2qBrqN+rqUEsT3YnExYpzj5yOBi+FlmV1Hw 49QYe1sn2ZPs In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------wHUkAf5af4l4Tx2pRmmXvaAY Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-12-04 We 3:07 AM, postgresql_contributors wrote: > Hi pg_hackers, > > I hope you are doing well. I am working on reviewing PostgreSQL > community tickets and started with the patch cf/5044. > This patch is in the branch cf/5044, and I pulled the code to test it. > Here’s what I have done so far: > > * > Pulled the code from the branch cf/5044. > * > Compiled the code. > * > Set up the database as required. > > Tested the query for this patch mentioned in the community chat > (https://commitfest.postgresql.org/50/5044/ > ) . > However, I didn’t get the expected output mentioned in the ticket > (below mentioned example). > > CREATE TABLE foo3(id serial PRIMARY key, txt text); > > INSERT INTO foo3 (txt) VALUES ('aaa'),('bbb'); > DO $$ > DECLARE >     l_cnt int; > BEGIN >     l_cnt := 1 >     DELETE FROM foo3 WHERE id=1; > END; $$ > > -- without reaction - just don't work > > (2024-06-16 16:05:55) postgres=# set plpgsql.extra_errors to > 'strict_expr_check'; > SET > (2024-06-16 16:06:43) postgres=# DO $$ > > DECLARE >     l_cnt int; > BEGIN >     l_cnt := 1 >     DELETE FROM foo3 WHERE id=1; > END; $$; > ERROR:  syntax error at or near "DELETE" > LINE 11:     DELETE FROM foo3 WHERE id=1; >              ^ > Please provide guidance on this patch. > Well, it's told you what the problem is - there's a syntax error. And it's pretty glaring: the line     l_cnt := 1 is missing a trailing semicolon. So I suggest you add that and then keep going. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------wHUkAf5af4l4Tx2pRmmXvaAY Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2024-12-04 We 3:07 AM, postgresql_contributors wrote:
Hi pg_hackers,

I hope you are doing well. I am working on reviewing PostgreSQL community tickets and started with the patch cf/5044. 
This patch is in the branch cf/5044, and I pulled the code to test it.
Here’s what I have done so far:
  • Pulled the code from the branch cf/5044.
  • Compiled the code.
  • Set up the database as required.
Tested the query for this patch mentioned in the community chat (https://commitfest.postgresql.org/50/5044/) .
However, I didn’t get the expected output mentioned in the ticket (below mentioned example).

CREATE TABLE foo3(id serial PRIMARY key, txt text);

INSERT INTO foo3 (txt) VALUES ('aaa'),('bbb');
DO $$
DECLARE
    l_cnt int;
BEGIN
    l_cnt := 1
    DELETE FROM foo3 WHERE id=1;
END; $$

-- without reaction - just don't work

(2024-06-16 16:05:55) postgres=# set plpgsql.extra_errors to
'strict_expr_check';
SET
(2024-06-16 16:06:43) postgres=# DO $$

DECLARE
    l_cnt int;
BEGIN
    l_cnt := 1
    DELETE FROM foo3 WHERE id=1;
END; $$;
ERROR:  syntax error at or near "DELETE"
LINE 11:     DELETE FROM foo3 WHERE id=1;
             ^
Please provide guidance on this patch.


Well, it's told you what the problem is - there's a syntax error. And it's pretty glaring: the line


    l_cnt := 1


is missing a trailing semicolon. So I suggest you add that and then keep going.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------wHUkAf5af4l4Tx2pRmmXvaAY--