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

default schema

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
HappyEngineer
Asked:
HappyEngineer
  • 2
1 Solution
 
ivanovnCommented:
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
 
earth man2Commented:
this is  a nasty dirty method -- you may like it.

set search_path( SCHEMA_1, SCHEMA_2, SCHEMA_3 );
0
 
earth man2Commented:
you can also set it in your postgresql.conf file.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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