patternsqlMinor
PostgreSQL no relations found
Viewed 0 times
postgresqlfoundrelations
Problem
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
However, after I run
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)Solution
The problem may be a namespace issue. You can
Keep in mind that by default
If you want to list relations in a namespace outside the search path, \d mynamespace.* will list them and their attributes. You can also:
To temporarily change the search path for purposes of using \d
\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
Code Snippets
set search_path = 'mynamespace';
\d
set search_path = 'public';Context
StackExchange Database Administrators Q#36248, answer score: 6
Revisions (0)
No revisions yet.