Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it
От | Tom Lane |
---|---|
Тема | Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it |
Дата | |
Msg-id | 22461.1303139728@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it (Frank van Vugt <ftm.van.vugt@foxi.nl>) |
Ответы |
Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it
|
Список | pgsql-general |
Frank van Vugt <ftm.van.vugt@foxi.nl> writes: > * upon issuing 'REASSIGN OWNED BY A TO postgres', all tables and _most_ > functions changed ownership, but not all.... a number of functions stay marked > as owned by A, nothing weird in the logs, the reassign looked like it > completed successfully Hmmm .... look into pg_shdepend to see if there are entries linking those functions to an owner. For instance, after regression=# create user joe; CREATE ROLE regression=# \c - joe You are now connected to database "regression" as user "joe". regression=> create function foo() returns int as 'select 1' language sql; CREATE FUNCTION I get regression=> select * from pg_shdepend; dbid | classid | objid | objsubid | refclassid | refobjid | deptype --------+---------+--------+----------+------------+----------+--------- ... 123822 | 1255 | 148691 | 0 | 1260 | 148690 | o ... 1255 = pg_proc, 1260 = pg_authid, and the other numbers are the OIDs of the database, function, and role (user) respectively. This data is what REASSIGN OWNED works off of, and I suppose that some rows must be wrong or missing in your pg_shdepend. regards, tom lane
В списке pgsql-general по дате отправления: