public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dean Rasheed <[email protected]>
To: SATYANARAYANA NARLAPURAM <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [BUG]: WHERE CURRENT OF cursor fail on tables that have virtual generated columns
Date: Wed, 22 Apr 2026 12:07:20 +0100
Message-ID: <CAEZATCV53iRZm5ho2-uNgZZ9AA7q3MNs_tVoo6-j5u5iz4buxg@mail.gmail.com> (raw)
In-Reply-To: <CAHg+QDdEVUvAB96FjCWgLoOhUWLqe+p4x2JaXyyhb=iBUFMhtw@mail.gmail.com>
References: <CAHg+QDc_TwzSgb=B_QgNLt3mvZdmRK23rLb+RkanSQkDF40GjA@mail.gmail.com>
	<CAEZATCUyKUrL_4pDZ=pqL68BcWznoyuCqGS3-7sm-Lc_UxS9HQ@mail.gmail.com>
	<CAHg+QDe3e-KOseG0SfumkX=Suu06YFZhchnv4c-7V_uWzDdmHA@mail.gmail.com>
	<CAEZATCUr0hTb0v_Tz1b-j7=tU=TWHT=EqY9ms9qjFOukVFzKPg@mail.gmail.com>
	<CAHg+QDdEVUvAB96FjCWgLoOhUWLqe+p4x2JaXyyhb=iBUFMhtw@mail.gmail.com>

On Mon, 20 Apr 2026 at 09:03, SATYANARAYANA NARLAPURAM
<[email protected]> 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





view thread (6+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [BUG]: WHERE CURRENT OF cursor fail on tables that have virtual generated columns
  In-Reply-To: <CAEZATCV53iRZm5ho2-uNgZZ9AA7q3MNs_tVoo6-j5u5iz4buxg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox