OK, I just went into

psql otrs

And did "\d" to show all tables.

They were all still owned by user postgres, so I did this to change
them all to owner otrs

first I just did

psql otrs -c "\d" > somefile

Then edited somefile to remove headers and footers

cat somefile | awk '{print $3}' > otherfile

Yes, that was a gratuitous cat :-)

Then just

for table in `cat otherfile`
do
psql otrs -c "ALTER TABLE $table OWNER TO otrs;"
done

And it worked!



-- 
“Don't eat anything you've ever seen advertised on TV”
         - Michael Pollan, author of "In Defense of Food"
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Reply via email to