Re: Check used privilege in a statment - Mailing list pgsql-general

From Tom Lane
Subject Re: Check used privilege in a statment
Date
Msg-id 3362837.1725948498@sss.pgh.pa.us
Whole thread Raw
In response to Check used privilege in a statment  (Ahmed Ibrahim <ahmedhssn02@gmail.com>)
List pgsql-general
Ahmed Ibrahim <ahmedhssn02@gmail.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



pgsql-general by date:

Previous
From: Ahmed Ibrahim
Date:
Subject: Check used privilege in a statment
Next
From: Matthias Leisi
Date:
Subject: Database schema for "custom fields"