ALTER .. OWNER TO error mislabels schema as other object type
От | Robert Haas |
---|---|
Тема | ALTER .. OWNER TO error mislabels schema as other object type |
Дата | |
Msg-id | CA+TgmoZxG8V+app_Hy6haupBXQX9VkJE_M0eLVfNMeEa7o3S5Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: ALTER .. OWNER TO error mislabels schema as other object type
Re: ALTER .. OWNER TO error mislabels schema as other object type |
Список | pgsql-hackers |
This looks busted: rhaas=# create role clerks; CREATE ROLE rhaas=# create role bob in role clerks; CREATE ROLE rhaas=# create schema foo; CREATE SCHEMA rhaas=# grant usage on schema foo to bob, clerks; GRANT rhaas=# create aggregate foo.sum(basetype=text,sfunc=textcat,stype=text,initcond=''); CREATE AGGREGATE rhaas=# alter aggregate foo.sum(text) owner to bob; ALTER AGGREGATE rhaas=# set role bob; SET rhaas=> alter aggregate foo.sum(text) owner to clerks; ERROR: permission denied for function foo Eh? There's no function called foo. There's a schema called foo, which seems to be the real problem: clerks needs to have CREATE on foo in order for bob to complete the rename. But somehow the error message is confused about what type of object it's dealing with. [ Credit: The above example is adapted from an EDB-internal regression test, the failure of which was what alerted me to this problem. ] -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: