"Peter Darley" <pdarley@kinesis-cem.com> writes:
> When I was young and foolish and setting up my DB initially I ended up with
> the objects in my DB owned by random users. I'd like to write a script to
> change the user for all objects to be the same, but I don't see any way to
> change the ownership of sequences. Any ideas?
ALTER TABLE OWNER should work on sequences (also indexes and views).
At least in 7.2 or later (didn't look at earlier versions). You could
also just poke pg_class.relowner ;-)
regards, tom lane