By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,661 Members | 1,330 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,661 IT Pros & Developers. It's quick & easy.

Updating the owner of a function

P: n/a
While migrating to 7.4, which performs quite nicely btw, I must have
performed some sequence of the migration incorrectly. Now, when I use
pg_dump on a database for backup, I get:

pg_dump: WARNING: owner of data type "plr_environ_type" appears to be invalid
pg_dump: WARNING: owner of data type "r_typename" appears to be invalid
pg_dump: WARNING: owner of function "plr_call_handler" appears to be invalid
pg_dump: WARNING: owner of function "reload_plr_modules" appears to be invalid
pg_dump: WARNING: owner of function "install_rcmd" appears to be invalid
pg_dump: WARNING: owner of function "plr_singleton_array" appears to be invalid
pg_dump: WARNING: owner of function "plr_array_push" appears to be invalid
pg_dump: WARNING: owner of function "plr_array_accum" appears to be invalid
pg_dump: WARNING: owner of function "r_typenames" appears to be invalid
pg_dump: WARNING: owner of function "load_r_typenames" appears to be invalid
pg_dump: WARNING: owner of function "s_riupdate" appears to be invalid
pg_dump: WARNING: owner of function "plr_environ" appears to be invalid

Becuase the original owner does not exist (uid 100) in pg_user. I was wondering if it would be safe to do:

UPDATE pg_proc SET proowner = <appropriate owner id>
WHERE proowner = 100;

Or should I dump and reload the database with an edited dump file, which is dumping:

SET SESSION_AUTHORIZATION "100";

Thanks!

Mike Mascari

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mike Mascari <ma*****@mascari.com> writes:
pg_dump: WARNING: owner of data type "plr_environ_type" appears to be invalid
etc Becuase the original owner does not exist (uid 100) in pg_user. I was
wondering if it would be safe to do: UPDATE pg_proc SET proowner = <appropriate owner id>
WHERE proowner = 100;


It would be safer to create a new user with sysid 100, who would thereby
acquire ownership of the orphaned objects. You could possibly go around
and locate all the owner columns and do the above, but what about
permissions (ACL columns)?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.