Separated pgAdmin and cmd psql databases

随声附和 提交于 2019-12-10 12:17:15

问题


How can I make cmd psql and pgAdmin 4 database sync? because they don't sync. cmd psql outputs postgres, template 01, and template 02 as db, while my pgAdmin4 outputs postgres and SampleDB as my databases.

psql output:

pgAdmin display:

pgAdmin inet:

cmd inet cmd inet


回答1:


I don't know the issue you are facing and what are you trying to achieve. do you want to do psql command and not in the gui PgAdmin4 where you can do more easily?

Here i am make new 3 database from pgAdmin4 and psql command

  1. From PgAdmin4 gui and the database name warehouses

  1. From psql command doing with owner name warehoused1

And as you can see in pic 2 the result it show the database too

  1. From psql command just create database without owner (default) name warehoused2

And see the result? no problem at all. Now see in PgAdmin4

It shows too in PgAdmin4. I can't give the solution because i don't know the issue you are facing.

Edit : The reason you have different result in your psql and pgAdmin because you have 2 postgresql in your system and your path lead to other postgresql it means your psql connect to different server.




回答2:


Solved!

Turns out I have 2 postgreSQL installed.

Uninstalled both and install only one and restarted computer. deleted appData/roaming/pgAdmin and postgreSQL folder.



来源:https://stackoverflow.com/questions/52381836/separated-pgadmin-and-cmd-psql-databases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!