DO $$DECLARE act_dbowner varchar(100);BEGIN SELECT u.usename into act_dbowner FROM pg_database d JOIN pg_user u ON (d.datdba = u.usesysid) WHERE d.datname = (SELECT current_database()); raise notice 'DB owner: %', act_dbowner; set role to act_dbowner; -- THIS LINE END$$;-------------
ERROR: role "act_dbowner" does not existCONTEXT: SQL statement "set role to act_dbowner"PL/pgSQL function inline_code_block line 10 at SQL statement
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных