public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Dean Rasheed <[email protected]>
Cc: jian he <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Virtual generated columns
Date: Mon, 9 Sep 2024 08:02:54 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEZATCVLfMzNwT1J0bnvtv6YbmNSN9QSXb+1QSGyX6vK4q67Ow@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CACJufxE+E-iYmBnZVZHiYA+WpyZZVv7BfiBLpo=T70EZHDU9rw@mail.gmail.com>
<[email protected]>
<CACJufxGh=XX7q5xTci---HikSJsOwP7_qCNyyDHdp2YL4NLZCg@mail.gmail.com>
<CACJufxHxoz_KVQxcQ=cSvJc+PNbh=FaHbcMZCOisoOaGAgjy4w@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAEZATCV=RX0M58-uqSR6tFjwQAFnEcx3hvW-9ZZfRQJLg5LzRw@mail.gmail.com>
<[email protected]>
<CAEZATCU3q=znAL7X1aSxuMpjfSyB1cT5j398HPb9ix9ci_HUqA@mail.gmail.com>
<[email protected]>
<CAEZATCVLfMzNwT1J0bnvtv6YbmNSN9QSXb+1QSGyX6vK4q67Ow@mail.gmail.com>
On 04.09.24 12:33, Dean Rasheed wrote:
>> I left the 0001 patch alone for now and put the new rewriting
>> implementation into 0002. (Unfortunately, the diff is kind of useless
>> for visual inspection.) Let me know if this matches what you had in
>> mind, please. Also, is this the right place in fireRIRrules()?
> Yes, that's what I had in mind except that it has to be called from
> the second loop in fireRIRrules(), after any RLS policies have been
> added, because it's possible for a RLS policy expression to refer to
> virtual generated columns. It's OK to do it in the same loop that
> expands RLS policies, because such policies can only refer to columns
> of the same relation, so once the RLS policies have been expanded for
> a given relation, nothing else should get added to the query that can
> refer to columns of that relation, at that query level, so at that
> point it should be safe to expand virtual generated columns.
If I move the code like that, then the postgres_fdw test fails. So
there is some additional interaction there that I need to study.
view thread (75+ messages) latest in thread
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: Virtual generated columns
In-Reply-To: <[email protected]>
* 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