Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am running ruby and rails app with postgresql database, and I want to do batch import from text file to the database.

I've configured the database and if I run psql and \l to list all databases, I can see it.

However, after I run rake db:migrate no relations are created in the database and running psql\d in order to check tables, says "No relations found". But the schema is created and I can see the tables in Induction PostgreSQL client (http://inductionapp.com)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The problem may be a namespace issue. You can \dn to list namespaces.

Keep in mind that by default \d only lists relations in the search path, and you can run show search_path to see what this is.

If you want to list relations in a namespace outside the search path, \d mynamespace.* will list them and their attributes. You can also:

set search_path = 'mynamespace';
\d
set search_path = 'public';

To temporarily change the search path for purposes of using \d

share|improve this answer
    
it's awesome, thank you –  Ilya Cherevkov Mar 8 '13 at 14:15
    
"namespace" is synonymous with "schema" in this case. –  Erwin Brandstetter Mar 10 '13 at 15:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.