Re: Check used privilege in a statment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ahmed Ibrahim <ahmedhssn02(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Check used privilege in a statment
Date: 2024-09-10 06:08:18
Message-ID: 3362837.1725948498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ahmed Ibrahim <ahmedhssn02(at)gmail(dot)com> writes:
> I am trying to know which privileges are used in a specific query but I am
> facing problems when I have nested queries. Where is the best place/hook I
> can check for all needed permissions for a query in the source? Currently,
> trying it in the exectuter start but the nested queries are problematic.

Nested queries are irrelevant, because the query is flat (or at least
the rangetable is) by the time it gets to the executor. See
ExecCheckPermissions.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Leisi 2024-09-10 06:57:26 Database schema for "custom fields"
Previous Message Ahmed Ibrahim 2024-09-10 04:22:25 Check used privilege in a statment