Solved

selecting a database in postgres

Posted on 2008-10-27
2
413 Views
Last Modified: 2008-10-28
Hi,
 like in mysql you have
use database db that selects the current database.

what is the equivalent in postgres ? it refuses "use database". In pg admin in the query editor how do I  write queries by not writing the name of the database all the time ?

thanks,
0
Comment
Question by:code4susant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:earth man2
ID: 22821259
in postgresql you use schemas to partition the data.  You can use a schema path to specify the order in which schemas are interrogated for a particular entity.
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 22821334
There is no equivalent.
You can set PGDATABASE in your environment if you want default database other than your username.
0

Featured Post

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question