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.96) (envelope-from ) id 1wFVQe-005DcZ-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 11:07:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFVQd-00DE1o-24 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 11:07:35 +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.96) (envelope-from ) id 1wFVQd-00DE1g-18 for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 11:07:35 +0000 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFVQb-00000002Sby-1kTW for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 11:07:35 +0000 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-8a1e1817db6so42414116d6.2 for ; Wed, 22 Apr 2026 04:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776856052; cv=none; d=google.com; s=arc-20240605; b=L6BvbcKuLtT+nfj3vE2/GGyK/f+Lz8zvl43DGWVYfHarnps4OB9N21m48BDAGiM45L hPWDohl1/PcwvodF9f1uCmyUu5uqj1EONM6qNjHYlLQsWZZc7OwTIOEchq8SNmJbSBiv TnkaQ9reBzX2HMw7ViLxuY7TdSvG2/nUDKry3LjYOCFU6JcA9JdgcjWIn0w9yEMDh2dA yrgGgt0pcfClfGnBXQhoCq9PZG1Xl0Yg+KyheyBmd3Vma7SHrijFiPSCFjGUW2d1rAFC 6xMNWTVzUezu42YQLX6TxMjgiOQ1dsDNKVBPTvYgBkEobKpD7nq46qpRlr1xEkjIHFJp G9JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=HO4zBz/sOVyYhhwn0r/R181ozUgJjZrFseGXwjH+myg=; fh=PDhzRmLFhJQgKl2kpY6iqaoiggk+rKjB8rXL7ERgOws=; b=Jfnfci2wlbdOBKenHCNsDYpr/XZcfb8C8+nv5f8vI5ztt3oDJwsQvGIcNJjQq0u2+9 haR7Ye3OkQguivF9wJygsBr7+aJtbohnkTlGLFfkJptf0f7c6olvVi3n2PSqC/b0E5e8 6JNNJFEvtTewHCIZfmullzvChHbExy24pVH3WuGU0rfLd2j3bN2V9EurNOC63EmHbMBW G/UUNXHeVqFMrG++0Ls8aWivUm+YN+KyGfKvKdi36XtkuFY7WQRyliq15qj3PKvSKNY5 vTDVZ1Mp9eGlQbBREI5+BaqPVVH2WJSe/XNNUOgGBvoiu7P2sAwz5gC78dkufr/sKHYI HCBg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776856052; x=1777460852; 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=HO4zBz/sOVyYhhwn0r/R181ozUgJjZrFseGXwjH+myg=; b=CWTxoeTzW/NgQzD5Wi85WRqC0LHVdjfT6dUtpThxKiimlT97ftKFkV4ED01gLk/Ut3 NIMU+n++yfpOsBjCfs05VhBnI80tsHLZeHTf/CgN/BvvJmjcrecg0YWKhgQ2cvVT15rJ 8ycVrCGEE/slntzZ7dAhnZSOiPGxwq88wpq56Z4BXi9XeSCbljGQNpij89VMSk0Ttjs+ Y0PYvAv2sC/UqyVh7bP6lOehFzR4nH694tg/ZKJc6Q5ycFGgDe3sptGrzdoROc1XhTpb qVyxqzG3ZFiXM+d0v37/iI3ja8ULV3MDCpnPSZSEtjfXGSYt5lBA40QRUXK/dXapcWyL ls8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776856052; x=1777460852; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HO4zBz/sOVyYhhwn0r/R181ozUgJjZrFseGXwjH+myg=; b=OeywnwviPrVs9Qf1PnWMXTfs92TiDNB9xObr38vhqxrQ4my2t0aME+kmSfCvoaHpaI X1UNQOnHB56mwqeYcq5U4qzFfOWOoJ95b4RaUqIIGLt+CPpkTfzBP6iNJNVIP31qWSsH IxVXwh0Ki57li0DsOmfYUjurYGOJmjVMMqV+v3nmd/gED+x4Pu9iHtXjBmnfr+0uAw83 fBDjOfDqwWwOMfnU9Xh/HcxS0AYHpdlpO7JbNgacvANoCFGD0ncarg2L90je2U5lVD77 o2c+1d2htEv+uyEb94n0f4rc9ldeHphZUASbKpL7S8lPZ7O3wDHTn25Zqt24i5SVIFyJ X7VA== X-Gm-Message-State: AOJu0YzYTlCDZNU6eeD9JZSoOaZd1PFXEPKs+9TjqEyACbleYGJrxgCB CqXypWyFDxB/+BbaZO3N4RrRV/iLu6ZNx2xK2g1W3T1ykyakiwZjGIPz5qpH7y3bmk6iWU5oKSd PL9+Modwkdsqx5wHcrYXcn8neOD7lggI= X-Gm-Gg: AeBDieuJqz/Gq/HTLGp7t92WCx16RGBnKaYhVbURwc2+LvymYOgFVies5JuFvYa/8CG QVxRKvgdxdquyfhOGGSL+7snsswB3cXkfr+6vN+AiqpbmN3kU84/hNRF1SrVLm62VDeW52SOZzX dmJSaLPyFF0CHc8oa39AvHUCIQtgjuXdzz6TLOCFBc6JCodx9O3Es5nk/GHBhHe9TjMQfYPNW9n 0csFMKx90tyD8K5gmaBQemjMZn8RmmZxX+4X6Eh8SLwX9PUrYYK426ptMaTtZvbVG3Oemo7mQJo o6IkPGF6hbeyq/N2cMV7DnnUHrmIO5EgHYs+v/0CleXAVD597DLD X-Received: by 2002:a05:6214:3203:b0:8ac:a757:c1e2 with SMTP id 6a1803df08f44-8b028164ea8mr336340816d6.47.1776856051787; Wed, 22 Apr 2026 04:07:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dean Rasheed Date: Wed, 22 Apr 2026 12:07:20 +0100 X-Gm-Features: AQROBzAaLXHCrOyTaQ0c9QWXcVHEXEIbXJbe8xe0iEz3TBO3PC4osKNzAa0AgV4 Message-ID: Subject: Re: [BUG]: WHERE CURRENT OF cursor fail on tables that have virtual generated columns To: SATYANARAYANA NARLAPURAM Cc: 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 On Mon, 20 Apr 2026 at 09:03, SATYANARAYANA NARLAPURAM wrote: > >> > Updated the patch to include a test case to reject view update with WHERE CURRENT OF. >> >> That's already tested in portals.sql, which seems like a better place >> for that test, since it's not related to virtual generated columns. I >> don't think another test is necessary -- admittedly portals.sql only >> tests DELETE, but the UPDATE code is the same, so I think the existing >> test is sufficient. We don't obsessively try to achieve 100% coverage >> in our tests. > I changed my mind on that and decided to add another test to portals.sql, just in case, since it is a separate code branch. I also spent some time looking to see whether there were any other ways that replace_rte_variables() could have been called (e.g., subquery pullup) that would fall foul of this, but I couldn't find any, so I think this bug only affects virtual generated columns. Pushed and back-patched to v18. Thanks for the report! Regards, Dean