2

How we can connect to specific database by using sql commands in pgadmin4 postgresql

in psql command line,its already working \c database name,same thing we want to connect to specific database in pgadmin4 postgresql

4
  • Please add some code of what you have tried already. Commented Mar 28, 2019 at 12:29
  • Thanks for your response, I am creating the database and schema by using below commands by using ide, but schema is creating under postgres(which i was used for authentication) db instead of created database. 1. create user username with password log 2. create database dbname owner username 3. SET SEARCH_PATH TO dbname 4. create schema schemaname AUTHORIZATION username; But i want schema to be created under newly created database Commented Mar 28, 2019 at 13:26
  • You should use psql, not pgAdmin, if you want to run a script. Commented Mar 28, 2019 at 15:02
  • Actually from our development tool we are trying to create database and schema by using above commands,but schema is not creating under created database Commented Mar 28, 2019 at 15:19

1 Answer 1

3

The pgadmin4 SQL window executes only SQL commands, which are bound to a specific database. \c is an internal psql command. You need to open separate SQL windows per database in pgadmin4.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.