I have different schemas in my database like,




My default schema is Public. So I try to change from default schema to another schema. I know how to change the schema from one to another.

set search_path to Hotel_Management;

But my doubt is, What is the real difference between to and = in set search_path?.

For example:

Set search_path to Hotel_Management;


Set search_path = Hotel_Management;

Thanks in Advance...


There is no difference.

If you look at the manual one is the alternative to the other. { TO | = } means either TO or =

The meaning of that is explained at the start of the manual

and vertical lines | indicate that you must choose one alternative

| improve this answer | |
  • Nitpicking: "you must choose one alternative" does not mean they are equivalent. For example { timezone | LOCAL | DEFAULT }, the 3 choices are not the same thing. But I agree that there is no difference in this case. If there was a difference between TO and =, it would have been explained in that page. – ypercubeᵀᴹ Nov 11 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.