Re: BUG #18271: Re: Postgres policy exists bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vost_800(at)gmx(dot)de
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18271: Re: Postgres policy exists bug
Date: 2024-01-05 15:14:17
Message-ID: 946635.1704467657@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> After submitting my initial report, I attempted to find a workaround for the
> issue. However, during this process, I discovered the same behavior as with
> the EXISTS operation, specifically when dealing with subqueries.

Neither here nor in the other thread have you provided a
*self-contained* example of what you think is wrong. I experimented
with a function like your example here and couldn't see anything that
looked wrong to me.

As far as this bit goes:

> FALSE IN (
> SELECT is_private
> FROM public.profiles AS p
> WHERE p.user_id = user_id
> )

you do realize that "user_id" here will be resolved as p.user_id
because that's the most closely nested source of such a column?
So that WHERE clause will not provide any useful filter.

Your function example doesn't have that bug, but your original
policy definition looks like it might.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Wladimir 2024-01-05 15:52:53 Re: BUG #18271: Re: Postgres policy exists bug
Previous Message PG Bug reporting form 2024-01-05 14:05:59 BUG #18271: Re: Postgres policy exists bug