Problem when reloading data from older version
От | Oliver Elphick |
---|---|
Тема | Problem when reloading data from older version |
Дата | |
Msg-id | 199906072332.AAA15047@linda.lfix.co.uk обсуждение исходный текст |
Ответы |
Re: [HACKERS] Problem when reloading data from older version
|
Список | pgsql-hackers |
Restoring a full dump from 6.4.2 into 6.5: When the owner of a database does not have usesuper privilege in pg_shadow, it is not possible to recreate items that were created with superuser privilege, even if the superuser is running the script: ======== example ============== \connect template1 select datdba into table tmp_pg_shadow from pg_database where datname = 'template1'; delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba; drop table tmp_pg_shadow; copy pg_shadow from stdin; ... user1 1005 t t f t \N \. \connect template1 user1 create database morejunk; \connect morejunk user1 ... CREATE FUNCTION "plpgsql_call_handler" ( ) RETURNS opaque AS '/usr/lib/postgresql/lib/plpgsql.so' LANGUAGE 'C'; ... Result: QUERY: CREATE FUNCTION "plpgsql_call_handler" ( ) RETURNS opaque AS '/usr/lib/postgresql/lib/plpgsql.so' LANGUAGE 'C'; ERROR: Only users with Postgres superuser privilege are permitted to create a function in the 'C' language. Others may use the 'sql' language or the created procedural languages. ====================== It would seem that there should be some command that operates with superuser privilege, whatever the nominal state indicated by the data. Since the above script was being run by postgres, it should all have been capable of being executed. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID32B8FAA1 ======================================== "There is a way that seems right to a man, but in the end it leads to death." Proverbs 16:25
В списке pgsql-hackers по дате отправления: