I'm wondering why \\d
only lists tables in the public schema? I have another schema in the database, sps , but those tables are not listed...
# psql -p 5432 -U postgres -h localhost myDB
Password for user postgres:
psql (9.1.5)
Type "help" for help.
myDB=# \d
List of relations
Schema | Name | Type | Owner
--------+----------------------------+----------+----------
public | tableA | table | postgres
public | tableB | table | postgres
public | tableC | table | postgres
public | table_col_seq | sequence | postgres
(4 rows)
You need to change your search_path
. In psql
use \\dn
and then build your search_path
:
SET search_path = schema1,schema2,public;
I had this problem i Intellij IDEA Database tab.
I got the soultion doing : Data Sources and Drivers -> YOUR_DATA_SOURCE -> Schemas -> Check "All databases"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.