hi everyone 
first of all i do not know if this right or wrong ^_^
But i think its good >> well its good for me 
mmmmmm ...
db_connect commend its taking a long time for lazy boys like me so i found another way to get easily to database without this commends :
you don't need to do all of this :
Code:
db_driver postgresql
Code:
db_connect postgres:[password@localhos:port/database-name]
you only need this one
when you get into metasploit framework by :
then only use this :
Code:
db_connect -y /opt/framework3/config/database.yml
or any path to the postgresql database or whatever database your using
if you don't find out this path just type in this the terminal :
Code:
locate database.yml
and chose the framework path
ohhhhh i forgot to tell you that's am new with backtrack and if all of this is wrong plz let me know 
i hop it's helpful > ^_^