Solved

default schema

Posted on 2006-11-27
3
731 Views
Last Modified: 2008-01-16
When I run queries with pgAdmin, I always need to specify the schema before all table names. How can I make that optional?

Instead of doing:
   select * from name.someTable;
I want do just do:
   select * from someTable.

However, I don't want to break old queries. I want both of those queries to do the same thing.
0
Comment
Question by:HappyEngineer
[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
3 Comments
 
LVL 10

Expert Comment

by:ivanovn
ID: 18029335
You can use synonyms. Check out this post and the attached patch you will need to apply in order to use it: http://archives.postgresql.org/pgsql-patches/2006-03/msg00085.php
0
 
LVL 22

Expert Comment

by:earth man2
ID: 18031532
this is  a nasty dirty method -- you may like it.

set search_path( SCHEMA_1, SCHEMA_2, SCHEMA_3 );
0
 
LVL 22

Accepted Solution

by:
earth man2 earned 500 total points
ID: 18031739
you can also set it in your postgresql.conf file.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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…
Suggested Courses

623 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