
31 Jul
2009
31 Jul
'09
7:06 p.m.
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"