Wednesday, May 13, 2009

Working with PostGre

(I'm still writting this article, sorry for inconvenience)
I had a quite a different experience in working with PostGre as I was working with MySQL for so long and found some features in PostGre are quite interesting...

PostGre history

PostGre current situation

My experiences with PostGre

Examples

To dump a database:

$ pg_dump mydb > db.out

To reload this database:

$ psql -d database -f db.out

To dump a database called mydb to a tar file:

$ pg_dump -Ft mydb > db.tar

To reload this dump into an existing database called newdb:

$ pg_restore -d newdb db.tar