Re: error in trigger creation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: error in trigger creation
Дата
Msg-id 2720974.1713710606@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: error in trigger creation  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: error in trigger creation  (yudhi s <learnerdatabase99@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, April 21, 2024, yudhi s <learnerdatabase99@gmail.com> wrote:
>> Are you saying something like below, in which we first create the
>> function from super user and then execute the grant? But doesn't that mean,
>> each time we want to create a new event trigger we have to be again
>> dependent on the "super user" to modify the security definer function?

> Dynamic SQL.  See “execute” in plpgsql.

You might as well just give that user superuser and be done with it.
It's foolish to imagine that you have any shred of security left
if you're letting a user that's not 100.00% trusted write event
triggers.  (Much less execute any SQL command whatsoever, which
is what it sounds like David is suggesting you create a function
to do.)

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: error in trigger creation
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Logging statement having any threat?