Archive for the 'database' Category
December 7th, 2011
On dumping and restoring PostgreSQL databases, there may be the case for restoring selected tables from a global db dump.
For this to happen one needs to have the right options when dumping the data.
pg_dump
$ pg_dump -Fc -U username database_name > db_dump
Now, we have a “restore customizable” compressed dump of the database.
From the postgres documentation:
-F format
–format=format
Selects […]
posted by pedro mg at 6:42 pm
& filed under linux, ubuntu, unix, postgres, postgresql, database | 2 Comments »
December 2nd, 2011
Needed to convert a client Microsoft SQLSERVER database to our PostgreSQL database server.
Lots of tables, severall Gigabytes of data.
In Windows:
open the SQL Server administration console for the databae and do a DIR > tables.txt to get a file with all the table names;
remove all the tables you will not be needing from the file;
now to […]
posted by pedro mg at 1:31 am
& filed under linux, shell, windows, unix, postgres, postgresql, database | No Comments »
March 10th, 2010
Apple OSX Snow Leopard
System Version: Mac OS X 10.6.2
Kernel Version: Darwin 10.2.0
Install notes for PosgreSQL 8.4 install using the great
Homebrew by Adam Vandenberg.
Run the author’s installation script, and that’s it. Try:
$ brew help
$ brew search postgresql
$ brew install postgresql
==> Summary
/usr/local/Cellar/postgresql/8.4.2: 2297 files, 31M, built in 3.3 minutes
$ brew info postgresql
postgresql 8.4.2
My advice ? Use Homebrew. True UNIX […]
posted by pedro mg at 11:15 am
& filed under tech, apple, ruby, code, git, github, gist, osx, unix, postgres, postgresql, datamapper, database, dbms | 7 Comments »
February 12th, 2008
PostgreSQL 8.3 is here. After apt-get’ing it, the upgrade didn’t move the 8.2 cluster up. Having 8.2 running in a custom port, made 8.3 go use the standard 5432 port.
8.3 created a main cluster.
Check ports:
$ sudo netstat -anput | grep postgres
Check wich configuration files and wich versions are running:
$ ps -Af | grep postgres
pg_upgradecluster when […]
posted by pedro mg at 1:10 am
& filed under linux, postgres, postgresql, database, dbms | 5 Comments »