Re: Security Definer functions no longer works in PG14+
От | Jan Katins |
---|---|
Тема | Re: Security Definer functions no longer works in PG14+ |
Дата | |
Msg-id | CAAc324hNuW-FqTnpXbsyA8FmocoGx7AcULiFE7yxmqiw2gKkfQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Security Definer functions no longer works in PG14+ (Jobin Augustine <jobinau@gmail.com>) |
Ответы |
Re: Security Definer functions no longer works in PG14+
Re: Security Definer functions no longer works in PG14+ |
Список | pgsql-bugs |
Hi,
The aiven-extras repo has a workaround for that, using dblink: https://github.com/aiven/aiven-extras/commit/eb8c1107ca91a7da5ecb0c8127c94ce42762881d
Jan
On Thu, 5 May 2022, 17:49 Jobin Augustine, <jobinau@gmail.com> wrote:
Hello Community and Hackers,A function like:CREATE OR REPLACE FUNCTION fn_sql_refresh() RETURNS void AS $$ALTER SUBSCRIPTION sub REFRESH PUBLICATION;$$ LANGUAGE SQL SECURITY DEFINER;Works with PostgreSQL 13 and older versions.But gives error on PostgreSQL 14 as follows:postgres=> select fn_sql_refresh();ERROR: ALTER SUBSCRIPTION ... REFRESH cannot be executed from a functionCONTEXT: SQL function "fn_sql_refresh" statement 1I believe, this is a consequence of :
https://git.postgresql.org/gitweb/?p=postgresql.git;h=ce0fdbfe9722867b7fad4d3ede9b6a6bfc51fb4eBut it is hurting good operational use cases of logical replication.Regards,Jobin.
В списке pgsql-bugs по дате отправления: