• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

selecting a database in postgres

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
code4susant
Asked:
code4susant
1 Solution
 
earth man2Commented:
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
 
gheistCommented:
There is no equivalent.
You can set PGDATABASE in your environment if you want default database other than your username.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now