PostgreSQL - No relations found. -


i’m totally new developer world, apologize if i’m not make question clearly, please don’t hesitate point out if did wrong. thanks.

i faced problem on setting postgresql db, no relations found when type command timlin=# \d.

i did try below solution fix didn’t work. postgresql database owner can't access database - "no relations found."

below situation

timlin=# \dn+                        list of schemas   name  | owner  | access privileges |      description        --------+--------+-------------------+————————————  public | timlin | timlin=uc/timlin +| standard public schema         |        | =uc/timlin        |  (1 row)  timlin=# \l                                     list of databases         name         | owner  | encoding |   collate   |    ctype    | access privileges   ---------------------+--------+----------+-------------+-------------+--------------------  postgres            | timlin | utf8     | en_us.utf-8 | en_us.utf-8 |   psqlapp             | timlin | utf8     | en_us.utf-8 | en_us.utf-8 |   psqlapp_development | timlin | utf8     | en_us.utf-8 | en_us.utf-8 |   psqlapp_test        | timlin | utf8     | en_us.utf-8 | en_us.utf-8 |   psqlappdemo         | timlin | utf8     | en_us.utf-8 | en_us.utf-8 | =tc/timlin        +                      |        |          |             |             | timlin=ctc/timlin +                      |        |          |             |             | psqlapp=ctc/timlin  template0           | timlin | utf8     | en_us.utf-8 | en_us.utf-8 | =c/timlin         +                      |        |          |             |             | timlin=ctc/timlin  template1           | timlin | utf8     | en_us.utf-8 | en_us.utf-8 | =c/timlin         +                      |        |          |             |             | timlin=ctc/timlin  timlin              | timlin | utf8     | en_us.utf-8 | en_us.utf-8 |  (8 rows)  timlin=# \du                              list of roles  role name |                   attributes                   | member of  -----------+------------------------------------------------+-----------  psqlapp   |                                                | {}  timlin    | superuser, create role, create db, replication | {} 

i check each 1 , couldn't find difference between previous soultion. while try

timlin=# \d 

i still got result : no relations found.

what missed ? how can fix ? please advice , thank in advence.

this imply database timlin not contain tables in public schema (which \d list).

it sounds created empty database, e.g.:

createdb -h localhost -u postgres timlin 

in case, after creation, \d return:

no relations found.

you need explicitly create 1 or more tables in order see listed in output of \d.

e.g. if following:

create table foo (id serial, val text); 

and \d, following output result:

             list of relations  schema |    name    |   type   |  owner    --------+------------+----------+----------  public | foo        | table    | postgres  public | foo_id_seq | sequence | postgres (2 rows) 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -