Random sysadmin tips:
SQL is a great tool but it's also highly destructive if you just forget a WHERE. Just remember to BEGIN; a transaction when you're playing with it, you can then COMMIT; after changes or ROLLBACK/quit.
Since PG is so great, you can even change table structure within a transaction and test changes.