"Peter Darley" <pdarley@kinesis-cem.com> writes:
> Friends, 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? Thanks, Peter Darley
If you are using some sh descendant somthing like:
for x in `psql -c '\dts' mydb -tA | cut -d\| -f1`; do
psql -c "ALTER TABLE $x OWNER TO newowner;" mydb
done
should do the work.
Regards,
Manuel.